Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 void SetSubresourceLoadInfo( | 105 void SetSubresourceLoadInfo( |
| 106 std::unique_ptr<SubresourceLoadInfo> subresource_load_info, | 106 std::unique_ptr<SubresourceLoadInfo> subresource_load_info, |
| 107 URLLoaderFactoryGetter* default_url_loader); | 107 URLLoaderFactoryGetter* default_url_loader); |
| 108 | 108 |
| 109 // Ownership of the |handler| is transferred to us via this call. This is | 109 // Ownership of the |handler| is transferred to us via this call. This is |
| 110 // only for subresource requests. | 110 // only for subresource requests. |
| 111 void set_request_handler(std::unique_ptr<AppCacheRequestHandler> handler) { | 111 void set_request_handler(std::unique_ptr<AppCacheRequestHandler> handler) { |
| 112 sub_resource_handler_ = std::move(handler); | 112 sub_resource_handler_ = std::move(handler); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Binds to the URLLoaderClient instance passed in via the |client| | |
|
yzshen1
2017/07/24 17:48:54
The naming and comment are a little confusing: thi
ananta
2017/07/24 18:53:18
Thanks. Renamed to BindRequest
| |
| 116 // parameter. | |
| 117 void BindToClient(mojom::URLLoaderClientPtr client, | |
| 118 mojom::URLLoaderRequest request); | |
| 119 | |
| 115 protected: | 120 protected: |
| 116 // AppCacheJob::Create() creates this instance. | 121 // AppCacheJob::Create() creates this instance. |
| 117 friend class AppCacheJob; | 122 friend class AppCacheJob; |
| 118 | 123 |
| 119 AppCacheURLLoaderJob(const ResourceRequest& request, | 124 AppCacheURLLoaderJob(const ResourceRequest& request, |
| 120 AppCacheURLLoaderRequest* appcache_request, | 125 AppCacheURLLoaderRequest* appcache_request, |
| 121 AppCacheStorage* storage); | 126 AppCacheStorage* storage); |
| 122 | 127 |
| 123 // AppCacheStorage::Delegate methods | 128 // AppCacheStorage::Delegate methods |
| 124 void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, | 129 void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 // The AppCacheURLLoaderRequest instance. We use this to set the response | 217 // The AppCacheURLLoaderRequest instance. We use this to set the response |
| 213 // info when we receive it. | 218 // info when we receive it. |
| 214 AppCacheURLLoaderRequest* appcache_request_; | 219 AppCacheURLLoaderRequest* appcache_request_; |
| 215 | 220 |
| 216 DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoaderJob); | 221 DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoaderJob); |
| 217 }; | 222 }; |
| 218 | 223 |
| 219 } // namespace content | 224 } // namespace content |
| 220 | 225 |
| 221 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ | 226 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_ |
| OLD | NEW |