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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 2180933002: Add experimental code behind a flag for Content Size Policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: while -> for Created 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 namespace storage { 53 namespace storage {
54 class ShareableFileReference; 54 class ShareableFileReference;
55 } 55 }
56 56
57 namespace content { 57 namespace content {
58 class AppCacheService; 58 class AppCacheService;
59 class AsyncRevalidationManager; 59 class AsyncRevalidationManager;
60 class CertStore; 60 class CertStore;
61 class ContentSizeResourceHandlerManager;
61 class LoaderDelegate; 62 class LoaderDelegate;
62 class NavigationURLLoaderImplCore; 63 class NavigationURLLoaderImplCore;
63 class RenderFrameHostImpl; 64 class RenderFrameHostImpl;
64 class ResourceContext; 65 class ResourceContext;
65 class ResourceDispatcherHostDelegate; 66 class ResourceDispatcherHostDelegate;
66 class ResourceMessageDelegate; 67 class ResourceMessageDelegate;
67 class ResourceMessageFilter; 68 class ResourceMessageFilter;
68 class ResourceRequestInfoImpl; 69 class ResourceRequestInfoImpl;
69 class SaveFileManager; 70 class SaveFileManager;
70 class ServiceWorkerNavigationHandleCore; 71 class ServiceWorkerNavigationHandleCore;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // the caller must send it to the old resource handler instead of cancelling 259 // the caller must send it to the old resource handler instead of cancelling
259 // it. 260 // it.
260 virtual std::unique_ptr<ResourceHandler> MaybeInterceptAsStream( 261 virtual std::unique_ptr<ResourceHandler> MaybeInterceptAsStream(
261 const base::FilePath& plugin_path, 262 const base::FilePath& plugin_path,
262 net::URLRequest* request, 263 net::URLRequest* request,
263 ResourceResponse* response, 264 ResourceResponse* response,
264 std::string* payload); 265 std::string* payload);
265 266
266 ResourceScheduler* scheduler() { return scheduler_.get(); } 267 ResourceScheduler* scheduler() { return scheduler_.get(); }
267 268
269 ContentSizeResourceHandlerManager* content_size_manager() {
270 return content_size_manager_.get();
271 }
272
268 // Called by a ResourceHandler when it's ready to start reading data and 273 // Called by a ResourceHandler when it's ready to start reading data and
269 // sending it to the renderer. Returns true if there are enough file 274 // sending it to the renderer. Returns true if there are enough file
270 // descriptors available for the shared memory buffer. If false is returned, 275 // descriptors available for the shared memory buffer. If false is returned,
271 // the request should cancel. 276 // the request should cancel.
272 bool HasSufficientResourcesForRequest(net::URLRequest* request); 277 bool HasSufficientResourcesForRequest(net::URLRequest* request);
273 278
274 // Called by a ResourceHandler after it has finished its request and is done 279 // Called by a ResourceHandler after it has finished its request and is done
275 // using its shared memory buffer. Frees up that file descriptor to be used 280 // using its shared memory buffer. Frees up that file descriptor to be used
276 // elsewhere. 281 // elsewhere.
277 void FinishedWithResourcesForRequest(net::URLRequest* request); 282 void FinishedWithResourcesForRequest(net::URLRequest* request);
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 // AsyncRevalidationManager is non-NULL if and only if 625 // AsyncRevalidationManager is non-NULL if and only if
621 // stale-while-revalidate is enabled. 626 // stale-while-revalidate is enabled.
622 std::unique_ptr<AsyncRevalidationManager> async_revalidation_manager_; 627 std::unique_ptr<AsyncRevalidationManager> async_revalidation_manager_;
623 628
624 typedef std::map<GlobalRequestID, 629 typedef std::map<GlobalRequestID,
625 base::ObserverList<ResourceMessageDelegate>*> DelegateMap; 630 base::ObserverList<ResourceMessageDelegate>*> DelegateMap;
626 DelegateMap delegate_map_; 631 DelegateMap delegate_map_;
627 632
628 std::unique_ptr<ResourceScheduler> scheduler_; 633 std::unique_ptr<ResourceScheduler> scheduler_;
629 634
635 std::unique_ptr<ContentSizeResourceHandlerManager> content_size_manager_;
636
630 // Allows tests to use a mock CertStore. If set, the CertStore must 637 // Allows tests to use a mock CertStore. If set, the CertStore must
631 // outlive this ResourceDispatcherHostImpl. 638 // outlive this ResourceDispatcherHostImpl.
632 CertStore* cert_store_for_testing_; 639 CertStore* cert_store_for_testing_;
633 640
634 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 641 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
635 }; 642 };
636 643
637 } // namespace content 644 } // namespace content
638 645
639 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 646 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698