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

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

Issue 25772002: Allows prefetch requests to live beyond the renderer by delaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed all comments. Lots of tests. Using AsyncResourceHandler. Created 7 years, 1 month 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Called by a ResourceHandler after it has finished its request and is done 232 // Called by a ResourceHandler after it has finished its request and is done
233 // using its shared memory buffer. Frees up that file descriptor to be used 233 // using its shared memory buffer. Frees up that file descriptor to be used
234 // elsewhere. 234 // elsewhere.
235 void FinishedWithResourcesForRequest(const net::URLRequest* request_); 235 void FinishedWithResourcesForRequest(const net::URLRequest* request_);
236 236
237 private: 237 private:
238 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 238 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
239 TestBlockedRequestsProcessDies); 239 TestBlockedRequestsProcessDies);
240 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 240 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
241 CalculateApproximateMemoryCost); 241 CalculateApproximateMemoryCost);
242 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
243 DetachableResourceTimesOut);
244 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
245 TestProcessCancelDetachableTimesOut);
242 246
243 class ShutdownTask; 247 class ShutdownTask;
244 248
245 struct OustandingRequestsStats { 249 struct OustandingRequestsStats {
246 int memory_cost; 250 int memory_cost;
247 int num_requests; 251 int num_requests;
248 }; 252 };
249 253
250 friend class ShutdownTask; 254 friend class ShutdownTask;
251 friend class ResourceMessageDelegate; 255 friend class ResourceMessageDelegate;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; 512 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap;
509 513
510 OfflineMap offline_policy_map_; 514 OfflineMap offline_policy_map_;
511 515
512 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 516 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
513 }; 517 };
514 518
515 } // namespace content 519 } // namespace content
516 520
517 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 521 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698