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

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

Issue 12226005: Minimize PowerSaveBlocker usage during uploading data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use OneShotTimer Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/loader/power_save_block_resource_throttle.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 filter_->appcache_service(), 1015 filter_->appcache_service(),
1016 request_data.resource_type, 1016 request_data.resource_type,
1017 child_id, 1017 child_id,
1018 route_id, 1018 route_id,
1019 is_continuation_of_transferred_request, 1019 is_continuation_of_transferred_request,
1020 &throttles); 1020 &throttles);
1021 } 1021 }
1022 1022
1023 if (request->has_upload()) { 1023 if (request->has_upload()) {
1024 // Block power save while uploading data. 1024 // Block power save while uploading data.
1025 throttles.push_back(new PowerSaveBlockResourceThrottle("Uploading data.")); 1025 throttles.push_back(new PowerSaveBlockResourceThrottle());
1026 } 1026 }
1027 1027
1028 if (request_data.resource_type == ResourceType::MAIN_FRAME) { 1028 if (request_data.resource_type == ResourceType::MAIN_FRAME) {
1029 throttles.insert( 1029 throttles.insert(
1030 throttles.begin(), 1030 throttles.begin(),
1031 new TransferNavigationResourceThrottle(request)); 1031 new TransferNavigationResourceThrottle(request));
1032 } 1032 }
1033 1033
1034 if (!throttles.empty()) { 1034 if (!throttles.empty()) {
1035 handler.reset( 1035 handler.reset(
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 1701
1702 return i->second.get(); 1702 return i->second.get();
1703 } 1703 }
1704 1704
1705 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1705 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1706 int request_id) const { 1706 int request_id) const {
1707 return GetLoader(GlobalRequestID(child_id, request_id)); 1707 return GetLoader(GlobalRequestID(child_id, request_id));
1708 } 1708 }
1709 1709
1710 } // namespace content 1710 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/power_save_block_resource_throttle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698