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

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

Issue 2081833002: Remove dependency of content/browser/loader/power_save_block_resource_throttle.cc on browser_thread… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
« 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 <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 if (delegate_) { 1701 if (delegate_) {
1702 delegate_->RequestBeginning(request, 1702 delegate_->RequestBeginning(request,
1703 resource_context, 1703 resource_context,
1704 appcache_service, 1704 appcache_service,
1705 resource_type, 1705 resource_type,
1706 &throttles); 1706 &throttles);
1707 } 1707 }
1708 1708
1709 if (request->has_upload()) { 1709 if (request->has_upload()) {
1710 // Block power save while uploading data. 1710 // Block power save while uploading data.
1711 throttles.push_back( 1711 throttles.push_back(new PowerSaveBlockResourceThrottle(
1712 new PowerSaveBlockResourceThrottle(request->url().host())); 1712 request->url().host(),
1713 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
1714 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
1713 } 1715 }
1714 1716
1715 // TODO(ricea): Stop looking this up so much. 1717 // TODO(ricea): Stop looking this up so much.
1716 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request); 1718 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
1717 throttles.push_back(scheduler_->ScheduleRequest(child_id, route_id, 1719 throttles.push_back(scheduler_->ScheduleRequest(child_id, route_id,
1718 info->IsAsync(), request)); 1720 info->IsAsync(), request));
1719 1721
1720 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 1722 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
1721 std::move(throttles))); 1723 std::move(throttles)));
1722 1724
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2642 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2641 response->head.security_info = SerializeSecurityInfo(ssl); 2643 response->head.security_info = SerializeSecurityInfo(ssl);
2642 } 2644 }
2643 2645
2644 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2646 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2645 return cert_store_for_testing_ ? cert_store_for_testing_ 2647 return cert_store_for_testing_ ? cert_store_for_testing_
2646 : CertStore::GetInstance(); 2648 : CertStore::GetInstance();
2647 } 2649 }
2648 2650
2649 } // namespace content 2651 } // 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