Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: content/browser/appcache/appcache_request_handler.h

Issue 2982363002: Add support for fallback content for the frame. This includes main and subframes. (Closed)
Patch Set: Remove newline Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Sub-resource loading ------------------------------------- 153 // Sub-resource loading -------------------------------------
154 // Dedicated worker and all manner of sub-resources are handled here. 154 // Dedicated worker and all manner of sub-resources are handled here.
155 155
156 std::unique_ptr<AppCacheJob> MaybeLoadSubResource( 156 std::unique_ptr<AppCacheJob> MaybeLoadSubResource(
157 net::NetworkDelegate* network_delegate); 157 net::NetworkDelegate* network_delegate);
158 void ContinueMaybeLoadSubResource(); 158 void ContinueMaybeLoadSubResource();
159 159
160 // AppCacheHost::Observer override 160 // AppCacheHost::Observer override
161 void OnCacheSelectionComplete(AppCacheHost* host) override; 161 void OnCacheSelectionComplete(AppCacheHost* host) override;
162 162
163 // URLLoaderRequestHandler override 163 // URLLoaderRequestHandler override
michaeln 2017/07/28 19:11:02 nit: please make it more clear that these override
ananta 2017/07/28 22:59:22 Done.
164 void MaybeCreateLoader(const ResourceRequest& resource_request, 164 void MaybeCreateLoader(const ResourceRequest& resource_request,
165 ResourceContext* resource_context, 165 ResourceContext* resource_context,
166 LoaderCallback callback) override; 166 LoaderCallback callback) override;
167 mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory() override; 167 mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory() override;
168 bool MaybeCreateLoaderForResponse(
169 const ResourceResponseHead& response,
170 mojom::URLLoaderPtr* loader,
171 mojom::URLLoaderClientRequest* client_request) override;
168 172
169 // Data members ----------------------------------------------- 173 // Data members -----------------------------------------------
170 174
171 // What host we're servicing a request for. 175 // What host we're servicing a request for.
172 AppCacheHost* host_; 176 AppCacheHost* host_;
173 177
174 // Frame vs subresource vs sharedworker loads are somewhat different. 178 // Frame vs subresource vs sharedworker loads are somewhat different.
175 ResourceType resource_type_; 179 ResourceType resource_type_;
176 180
177 // True if corresponding AppCache group should be resetted before load. 181 // True if corresponding AppCache group should be resetted before load.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 232
229 // Network service related members. 233 // Network service related members.
230 234
231 // In the network service world we are queried via the URLLoaderRequestHandler 235 // In the network service world we are queried via the URLLoaderRequestHandler
232 // interface to see if the navigation request can be handled via the 236 // interface to see if the navigation request can be handled via the
233 // AppCache. We hold onto the AppCache job created here until the client 237 // AppCache. We hold onto the AppCache job created here until the client
234 // binds to it (Serviced via AppCache). If the request cannot be handled via 238 // binds to it (Serviced via AppCache). If the request cannot be handled via
235 // the AppCache, we delete the job. 239 // the AppCache, we delete the job.
236 std::unique_ptr<AppCacheJob> navigation_request_job_; 240 std::unique_ptr<AppCacheJob> navigation_request_job_;
237 241
238 // In the network service world, points to the getter for the network URL 242 // Points to the getter for the network URL loader.
239 // loader.
240 scoped_refptr<URLLoaderFactoryGetter> network_url_loader_factory_getter_; 243 scoped_refptr<URLLoaderFactoryGetter> network_url_loader_factory_getter_;
241 244
242 friend class content::AppCacheRequestHandlerTest; 245 friend class content::AppCacheRequestHandlerTest;
243 246
244 // Subresource load information. 247 // Subresource load information.
245 std::unique_ptr<SubresourceLoadInfo> subresource_load_info_; 248 std::unique_ptr<SubresourceLoadInfo> subresource_load_info_;
246 249
247 // The AppCache host instance. We pass this to the 250 // The AppCache host instance. We pass this to the
248 // AppCacheSubresourceURLFactory instance on creation. 251 // AppCacheSubresourceURLFactory instance on creation.
249 base::WeakPtr<AppCacheHost> appcache_host_; 252 base::WeakPtr<AppCacheHost> appcache_host_;
250 253
251 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); 254 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler);
252 }; 255 };
253 256
254 } // namespace content 257 } // namespace content
255 258
256 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 259 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698