[email protected] | 0a60884 | 2011-09-08 10:55:19 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 5 | #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
| 6 | #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 7 | |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
dcheng | 5971627 | 2016-04-09 05:19:08 | [diff] [blame] | 10 | #include <memory> |
| 11 | |
[email protected] | bfe1948 | 2011-09-30 22:14:57 | [diff] [blame] | 12 | #include "base/compiler_specific.h" |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 13 | #include "base/macros.h" |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 14 | #include "base/memory/weak_ptr.h" |
[email protected] | ea8e181 | 2012-02-15 22:07:34 | [diff] [blame] | 15 | #include "base/supports_user_data.h" |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 16 | #include "content/browser/appcache/appcache_entry.h" |
| 17 | #include "content/browser/appcache/appcache_host.h" |
Anantanarayanan Iyengar | d125c460 | 2017-08-19 00:46:56 | [diff] [blame] | 18 | #include "content/browser/appcache/appcache_request_handler.h" |
michaeln | b861840 | 2016-08-02 20:14:33 | [diff] [blame] | 19 | #include "content/browser/appcache/appcache_service_impl.h" |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 20 | #include "content/browser/loader/url_loader_request_handler.h" |
ananta | e60d1d4 | 2017-06-20 04:16:27 | [diff] [blame] | 21 | #include "content/browser/url_loader_factory_getter.h" |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 22 | #include "content/common/content_export.h" |
[email protected] | 7491ad0 | 2014-07-05 19:10:07 | [diff] [blame] | 23 | #include "content/public/common/resource_type.h" |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 24 | |
[email protected] | edfe7fab | 2010-11-28 13:11:52 | [diff] [blame] | 25 | namespace net { |
[email protected] | 9f17046 | 2012-08-24 01:06:58 | [diff] [blame] | 26 | class NetworkDelegate; |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 27 | class URLRequest; |
[email protected] | edfe7fab | 2010-11-28 13:11:52 | [diff] [blame] | 28 | } // namespace net |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 29 | |
[email protected] | 073f24d | 2014-04-09 00:00:23 | [diff] [blame] | 30 | namespace content { |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 31 | class AppCacheJob; |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 32 | class AppCacheNavigationHandleCore; |
Anantanarayanan Iyengar | 2130d27 | 2017-09-01 18:21:14 | [diff] [blame] | 33 | class AppCacheSubresourceURLFactory; |
ananta | 4e8a529 | 2017-05-04 03:07:15 | [diff] [blame] | 34 | class AppCacheRequest; |
[email protected] | 073f24d | 2014-04-09 00:00:23 | [diff] [blame] | 35 | class AppCacheRequestHandlerTest; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 36 | class AppCacheURLRequestJob; |
ananta | 2533bff6 | 2017-07-12 04:07:27 | [diff] [blame] | 37 | class AppCacheHost; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 38 | |
[email protected] | 6981d963 | 2010-11-30 21:34:02 | [diff] [blame] | 39 | // An instance is created for each net::URLRequest. The instance survives all |
| 40 | // http transactions involved in the processing of its net::URLRequest, and is |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 41 | // given the opportunity to hijack the request along the way. Callers |
| 42 | // should use AppCacheHost::CreateRequestHandler to manufacture instances |
| 43 | // that can retrieve resources for a particular host. |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 44 | class CONTENT_EXPORT AppCacheRequestHandler |
[email protected] | ea8e181 | 2012-02-15 22:07:34 | [diff] [blame] | 45 | : public base::SupportsUserData::Data, |
[email protected] | bfe1948 | 2011-09-30 22:14:57 | [diff] [blame] | 46 | public AppCacheHost::Observer, |
michaeln | b861840 | 2016-08-02 20:14:33 | [diff] [blame] | 47 | public AppCacheServiceImpl::Observer, |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 48 | public AppCacheStorage::Delegate, |
| 49 | public URLLoaderRequestHandler { |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 50 | public: |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 51 | ~AppCacheRequestHandler() override; |
[email protected] | 7e8e3dd | 2009-09-18 01:05:09 | [diff] [blame] | 52 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 53 | // These are called on each request intercept opportunity. |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 54 | // When the NetworkService is not enabled, the AppCacheInterceptor calls these |
| 55 | // methods directly. When the NetworkService is enabled, the various |
| 56 | // MaybeCreateLoader methods below call call these internally. |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 57 | AppCacheJob* MaybeLoadResource(net::NetworkDelegate* network_delegate); |
| 58 | AppCacheJob* MaybeLoadFallbackForRedirect( |
[email protected] | 9f17046 | 2012-08-24 01:06:58 | [diff] [blame] | 59 | net::NetworkDelegate* network_delegate, |
| 60 | const GURL& location); |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 61 | AppCacheJob* MaybeLoadFallbackForResponse( |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 62 | net::NetworkDelegate* network_delegate); |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 63 | |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 64 | void GetExtraResponseInfo(int64_t* cache_id, GURL* manifest_url); |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 65 | |
[email protected] | 5fcb289e | 2014-02-04 00:34:19 | [diff] [blame] | 66 | // Methods to support cross site navigations. |
| 67 | void PrepareForCrossSiteTransfer(int old_process_id); |
| 68 | void CompleteCrossSiteTransfer(int new_process_id, int new_host_id); |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 69 | void MaybeCompleteCrossSiteTransferInOldProcess(int old_process_id); |
[email protected] | 5fcb289e | 2014-02-04 00:34:19 | [diff] [blame] | 70 | |
michaeln | 054c2fd4 | 2016-01-16 02:33:48 | [diff] [blame] | 71 | // Useful for detecting storage partition mismatches in the context |
| 72 | // of cross site transfer navigations. |
| 73 | bool SanityCheckIsSameService(AppCacheService* service) { |
| 74 | return !host_ || (host_->service() == service); |
| 75 | } |
| 76 | |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 77 | // NetworkService loading |
Anantanarayanan Iyengar | d125c460 | 2017-08-19 00:46:56 | [diff] [blame] | 78 | |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 79 | // URLLoaderRequestHandler overrides - main resource loading. |
| 80 | // These methods are used by the NavigationURLLoaderNetworkService. |
| 81 | // Internally they use same methods used by the network library based impl, |
| 82 | // MaybeLoadResource and MaybeLoadFallbackForResponse. |
| 83 | // Eventually one of the Deliver*Response() methods is called and the |
| 84 | // LoaderCallback is invoked. |
| 85 | void MaybeCreateLoader(const ResourceRequest& resource_request, |
| 86 | ResourceContext* resource_context, |
| 87 | LoaderCallback callback) override; |
| 88 | // MaybeCreateLoaderForResponse always returns synchronously. |
| 89 | bool MaybeCreateLoaderForResponse( |
| 90 | const ResourceResponseHead& response, |
| 91 | mojom::URLLoaderPtr* loader, |
| 92 | mojom::URLLoaderClientRequest* client_request) override; |
Kinuko Yasuda | 250577c | 2017-10-29 02:51:24 | [diff] [blame^] | 93 | base::Optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams() |
| 94 | override; |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 95 | |
| 96 | // These methods are used for subresource loading by the |
| 97 | // AppCacheSubresourceURLFactory::SubresourceLoader class. |
| 98 | // Internally they use same methods used by the network library based impl, |
| 99 | // MaybeLoadResource, MaybeLoadFallbackForResponse, and |
| 100 | // MaybeLoadFallbackForRedirect. Eventually one of the Deliver*Response() |
| 101 | // methods is called and the LoaderCallback is invoked. |
| 102 | void MaybeCreateSubresourceLoader(const ResourceRequest& resource_request, |
| 103 | LoaderCallback callback); |
| 104 | void MaybeFallbackForSubresourceResponse(const ResourceResponseHead& response, |
| 105 | LoaderCallback callback); |
| 106 | void MaybeFallbackForSubresourceRedirect( |
| 107 | const net::RedirectInfo& redirect_info, |
| 108 | LoaderCallback callback); |
| 109 | void MaybeFollowSubresourceRedirect(const net::RedirectInfo& redirect_info, |
| 110 | LoaderCallback callback); |
[email protected] | 15f9cded | 2010-05-20 20:51:06 | [diff] [blame] | 111 | |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 112 | static std::unique_ptr<AppCacheRequestHandler> |
| 113 | InitializeForNavigationNetworkService( |
| 114 | const ResourceRequest& request, |
ananta | e60d1d4 | 2017-06-20 04:16:27 | [diff] [blame] | 115 | AppCacheNavigationHandleCore* appcache_handle_core, |
| 116 | URLLoaderFactoryGetter* url_loader_factory_getter); |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 117 | |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 118 | static bool IsMainResourceType(ResourceType type) { |
| 119 | return IsResourceTypeFrame(type) || type == RESOURCE_TYPE_SHARED_WORKER; |
| 120 | } |
| 121 | |
Anantanarayanan Iyengar | d125c460 | 2017-08-19 00:46:56 | [diff] [blame] | 122 | // Called by unittests to indicate that we are in test mode. |
| 123 | static void SetRunningInTests(bool in_tests); |
Anantanarayanan Iyengar | d125c460 | 2017-08-19 00:46:56 | [diff] [blame] | 124 | static bool IsRunningInTests(); |
ananta | 2533bff6 | 2017-07-12 04:07:27 | [diff] [blame] | 125 | |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 126 | private: |
| 127 | friend class AppCacheHost; |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 128 | friend class AppCacheRequestHandlerTest; |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 129 | |
[email protected] | 7e8e3dd | 2009-09-18 01:05:09 | [diff] [blame] | 130 | // Callers should use AppCacheHost::CreateRequestHandler. |
ananta | 4e8a529 | 2017-05-04 03:07:15 | [diff] [blame] | 131 | AppCacheRequestHandler(AppCacheHost* host, |
| 132 | ResourceType resource_type, |
| 133 | bool should_reset_appcache, |
| 134 | std::unique_ptr<AppCacheRequest> request); |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 135 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 136 | // AppCacheHost::Observer override |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 137 | void OnDestructionImminent(AppCacheHost* host) override; |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 138 | |
michaeln | b861840 | 2016-08-02 20:14:33 | [diff] [blame] | 139 | // AppCacheServiceImpl::Observer override |
| 140 | void OnServiceDestructionImminent(AppCacheServiceImpl* service) override; |
| 141 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 142 | // Helpers to instruct a waiting job with what response to |
| 143 | // deliver for the request we're handling. |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 144 | void DeliverAppCachedResponse(const AppCacheEntry& entry, |
| 145 | int64_t cache_id, |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 146 | const GURL& manifest_url, |
[email protected] | 2abcade | 2012-01-05 00:19:40 | [diff] [blame] | 147 | bool is_fallback, |
| 148 | const GURL& namespace_entry_url); |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 149 | void DeliverNetworkResponse(); |
| 150 | void DeliverErrorResponse(); |
| 151 | |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 152 | // Called just before the request is restarted. Grabs the reason for |
| 153 | // restarting, so can correctly continue to handle the request. |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 154 | void OnPrepareToRestartURLRequest(); |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 155 | |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 156 | // Helper method to create an AppCacheJob and populate job_. |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 157 | // Caller takes ownership of returned value. |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 158 | std::unique_ptr<AppCacheJob> CreateJob( |
mmenke | ed0498b | 2015-12-08 23:20:42 | [diff] [blame] | 159 | net::NetworkDelegate* network_delegate); |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 160 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 161 | // Helper to retrieve a pointer to the storage object. |
[email protected] | 15f9cded | 2010-05-20 20:51:06 | [diff] [blame] | 162 | AppCacheStorage* storage() const; |
| 163 | |
| 164 | bool is_main_resource() const { |
| 165 | return IsMainResourceType(resource_type_); |
| 166 | } |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 167 | |
| 168 | // Main-resource loading ------------------------------------- |
[email protected] | 15f9cded | 2010-05-20 20:51:06 | [diff] [blame] | 169 | // Frame and SharedWorker main resources are handled here. |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 170 | |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 171 | std::unique_ptr<AppCacheJob> MaybeLoadMainResource( |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 172 | net::NetworkDelegate* network_delegate); |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 173 | |
| 174 | // AppCacheStorage::Delegate methods |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 175 | void OnMainResponseFound(const GURL& url, |
| 176 | const AppCacheEntry& entry, |
| 177 | const GURL& fallback_url, |
| 178 | const AppCacheEntry& fallback_entry, |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 179 | int64_t cache_id, |
| 180 | int64_t group_id, |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 181 | const GURL& mainfest_url) override; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 182 | |
| 183 | // Sub-resource loading ------------------------------------- |
[email protected] | 15f9cded | 2010-05-20 20:51:06 | [diff] [blame] | 184 | // Dedicated worker and all manner of sub-resources are handled here. |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 185 | |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 186 | std::unique_ptr<AppCacheJob> MaybeLoadSubResource( |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 187 | net::NetworkDelegate* network_delegate); |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 188 | void ContinueMaybeLoadSubResource(); |
| 189 | |
| 190 | // AppCacheHost::Observer override |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 191 | void OnCacheSelectionComplete(AppCacheHost* host) override; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 192 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 193 | // Data members ----------------------------------------------- |
| 194 | |
| 195 | // What host we're servicing a request for. |
[email protected] | 7e8e3dd | 2009-09-18 01:05:09 | [diff] [blame] | 196 | AppCacheHost* host_; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 197 | |
[email protected] | 15f9cded | 2010-05-20 20:51:06 | [diff] [blame] | 198 | // Frame vs subresource vs sharedworker loads are somewhat different. |
[email protected] | 6c1e0521 | 2014-07-31 00:59:40 | [diff] [blame] | 199 | ResourceType resource_type_; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 200 | |
eustas | 2787684 | 2014-11-27 10:48:00 | [diff] [blame] | 201 | // True if corresponding AppCache group should be resetted before load. |
| 202 | bool should_reset_appcache_; |
| 203 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 204 | // Subresource requests wait until after cache selection completes. |
| 205 | bool is_waiting_for_cache_selection_; |
| 206 | |
| 207 | // Info about the type of response we found for delivery. |
| 208 | // These are relevant for both main and subresource requests. |
avi | b734894 | 2015-12-25 20:57:10 | [diff] [blame] | 209 | int64_t found_group_id_; |
| 210 | int64_t found_cache_id_; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 211 | AppCacheEntry found_entry_; |
| 212 | AppCacheEntry found_fallback_entry_; |
[email protected] | 2abcade | 2012-01-05 00:19:40 | [diff] [blame] | 213 | GURL found_namespace_entry_url_; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 214 | GURL found_manifest_url_; |
| 215 | bool found_network_namespace_; |
| 216 | |
[email protected] | 1e1f7d5 | 2010-08-25 21:38:20 | [diff] [blame] | 217 | // True if a cache entry this handler attempted to return was |
| 218 | // not found in the disk cache. Once set, the handler will take |
| 219 | // no action on all subsequent intercept opportunities, so the |
| 220 | // request and any redirects will be handled by the network library. |
| 221 | bool cache_entry_not_found_; |
| 222 | |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 223 | // True if the next time this request is started, the response should be |
| 224 | // delivered from the network, bypassing the AppCache. Cleared after the next |
| 225 | // intercept opportunity. |
| 226 | bool is_delivering_network_response_; |
| 227 | |
[email protected] | 17d64785 | 2012-09-08 17:45:52 | [diff] [blame] | 228 | // True if this->MaybeLoadResource(...) has been called in the past. |
| 229 | bool maybe_load_resource_executed_; |
| 230 | |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 231 | // The job we use to deliver a response. Only NULL during the following times: |
| 232 | // 1) Before request has started a job. |
| 233 | // 2) Request is not being handled by appcache. |
| 234 | // 3) Request has been cancelled, and the job killed. |
ananta | 46f3e94 | 2017-05-09 04:56:30 | [diff] [blame] | 235 | base::WeakPtr<AppCacheJob> job_; |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 236 | |
[email protected] | 5fcb289e | 2014-02-04 00:34:19 | [diff] [blame] | 237 | // During a cross site navigation, we transfer ownership the AppcacheHost |
| 238 | // from the old processes structures over to the new structures. |
dcheng | 5971627 | 2016-04-09 05:19:08 | [diff] [blame] | 239 | std::unique_ptr<AppCacheHost> host_for_cross_site_transfer_; |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 240 | int old_process_id_; |
| 241 | int old_host_id_; |
[email protected] | 5fcb289e | 2014-02-04 00:34:19 | [diff] [blame] | 242 | |
mmenke | 5289cbfd | 2015-10-29 19:36:17 | [diff] [blame] | 243 | // Cached information about the response being currently served by the |
| 244 | // AppCache, if there is one. |
| 245 | int cache_id_; |
| 246 | GURL manifest_url_; |
| 247 | |
michaeln | b861840 | 2016-08-02 20:14:33 | [diff] [blame] | 248 | // Backptr to the central service object. |
| 249 | AppCacheServiceImpl* service_; |
| 250 | |
ananta | 4e8a529 | 2017-05-04 03:07:15 | [diff] [blame] | 251 | std::unique_ptr<AppCacheRequest> request_; |
| 252 | |
ananta | 2533bff6 | 2017-07-12 04:07:27 | [diff] [blame] | 253 | // Network service related members. |
| 254 | |
Michael Nordman | 85243a8 | 2017-10-24 01:24:50 | [diff] [blame] | 255 | LoaderCallback loader_callback_; |
ananta | a2c8ec6 | 2017-06-09 23:44:05 | [diff] [blame] | 256 | |
ananta | b9800e5 | 2017-07-29 18:04:13 | [diff] [blame] | 257 | // Points to the getter for the network URL loader. |
ananta | e60d1d4 | 2017-06-20 04:16:27 | [diff] [blame] | 258 | scoped_refptr<URLLoaderFactoryGetter> network_url_loader_factory_getter_; |
| 259 | |
ananta | 2533bff6 | 2017-07-12 04:07:27 | [diff] [blame] | 260 | // The AppCache host instance. We pass this to the |
| 261 | // AppCacheSubresourceURLFactory instance on creation. |
| 262 | base::WeakPtr<AppCacheHost> appcache_host_; |
| 263 | |
[email protected] | 3367fc1d | 2009-11-09 00:09:21 | [diff] [blame] | 264 | DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 265 | }; |
| 266 | |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 267 | } // namespace content |
[email protected] | 97e3edc | 2009-09-15 22:07:15 | [diff] [blame] | 268 | |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 269 | #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |