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

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: _ 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
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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 filter_->appcache_service(), 1046 filter_->appcache_service(),
1047 request_data.resource_type, 1047 request_data.resource_type,
1048 child_id, 1048 child_id,
1049 route_id, 1049 route_id,
1050 is_continuation_of_transferred_request, 1050 is_continuation_of_transferred_request,
1051 &throttles); 1051 &throttles);
1052 } 1052 }
1053 1053
1054 if (request->has_upload()) { 1054 if (request->has_upload()) {
1055 // Block power save while uploading data. 1055 // Block power save while uploading data.
1056 throttles.push_back(new PowerSaveBlockResourceThrottle("Uploading data.")); 1056 throttles.push_back(new PowerSaveBlockResourceThrottle());
1057 } 1057 }
1058 1058
1059 if (request_data.resource_type == ResourceType::MAIN_FRAME) { 1059 if (request_data.resource_type == ResourceType::MAIN_FRAME) {
1060 throttles.insert( 1060 throttles.insert(
1061 throttles.begin(), 1061 throttles.begin(),
1062 new TransferNavigationResourceThrottle(request)); 1062 new TransferNavigationResourceThrottle(request));
1063 } 1063 }
1064 1064
1065 if (!throttles.empty()) { 1065 if (!throttles.empty()) {
1066 handler.reset( 1066 handler.reset(
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 1732
1733 return i->second.get(); 1733 return i->second.get();
1734 } 1734 }
1735 1735
1736 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1736 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1737 int request_id) const { 1737 int request_id) const {
1738 return GetLoader(GlobalRequestID(child_id, request_id)); 1738 return GetLoader(GlobalRequestID(child_id, request_id));
1739 } 1739 }
1740 1740
1741 } // namespace content 1741 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698