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

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

Issue 1706903003: Delay resource scheduling decisions until network access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests Created 4 years, 10 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 friend class ResourceDispatcherHostTest; 325 friend class ResourceDispatcherHostTest;
326 326
327 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 327 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
328 TestBlockedRequestsProcessDies); 328 TestBlockedRequestsProcessDies);
329 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 329 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
330 CalculateApproximateMemoryCost); 330 CalculateApproximateMemoryCost);
331 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 331 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
332 DetachableResourceTimesOut); 332 DetachableResourceTimesOut);
333 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 333 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
334 TestProcessCancelDetachableTimesOut); 334 TestProcessCancelDetachableTimesOut);
335 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, DidChangePriority);
335 336
336 struct OustandingRequestsStats { 337 struct OustandingRequestsStats {
337 int memory_cost; 338 int memory_cost;
338 int num_requests; 339 int num_requests;
339 }; 340 };
340 341
341 friend class ShutdownTask; 342 friend class ShutdownTask;
342 friend class ResourceMessageDelegate; 343 friend class ResourceMessageDelegate;
343 344
344 // Information about status of a ResourceLoader. 345 // Information about status of a ResourceLoader.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 DelegateMap delegate_map_; 649 DelegateMap delegate_map_;
649 650
650 scoped_ptr<ResourceScheduler> scheduler_; 651 scoped_ptr<ResourceScheduler> scheduler_;
651 652
652 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 653 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
653 }; 654 };
654 655
655 } // namespace content 656 } // namespace content
656 657
657 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 658 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698