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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2660983002: Change ProfileIOData::CreateHttpFactory to take an (Closed)
Patch Set: Get HttpTransactionFactory from URLRequestContext directly Created 3 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('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 #include "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 std::unique_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( 1301 std::unique_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
1302 net::HttpNetworkSession* session, 1302 net::HttpNetworkSession* session,
1303 std::unique_ptr<net::HttpCache::BackendFactory> main_backend) const { 1303 std::unique_ptr<net::HttpCache::BackendFactory> main_backend) const {
1304 return base::MakeUnique<net::HttpCache>( 1304 return base::MakeUnique<net::HttpCache>(
1305 base::WrapUnique(new DevToolsNetworkTransactionFactory( 1305 base::WrapUnique(new DevToolsNetworkTransactionFactory(
1306 network_controller_handle_.GetController(), session)), 1306 network_controller_handle_.GetController(), session)),
1307 std::move(main_backend), true /* set_up_quic_server_info */); 1307 std::move(main_backend), true /* set_up_quic_server_info */);
1308 } 1308 }
1309 1309
1310 std::unique_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory( 1310 std::unique_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory(
1311 net::HttpNetworkSession* shared_session, 1311 net::HttpTransactionFactory* main_http_factory,
1312 std::unique_ptr<net::HttpCache::BackendFactory> backend) const { 1312 std::unique_ptr<net::HttpCache::BackendFactory> backend) const {
1313 DCHECK(main_http_factory);
1314 net::HttpNetworkSession* shared_session = main_http_factory->GetSession();
1313 return base::MakeUnique<net::HttpCache>( 1315 return base::MakeUnique<net::HttpCache>(
1314 base::WrapUnique(new DevToolsNetworkTransactionFactory( 1316 base::WrapUnique(new DevToolsNetworkTransactionFactory(
1315 network_controller_handle_.GetController(), shared_session)), 1317 network_controller_handle_.GetController(), shared_session)),
1316 std::move(backend), true /* set_up_quic_server_info */); 1318 std::move(backend), true /* set_up_quic_server_info */);
1317 } 1319 }
1318 1320
1319 void ProfileIOData::SetCookieSettingsForTesting( 1321 void ProfileIOData::SetCookieSettingsForTesting(
1320 content_settings::CookieSettings* cookie_settings) { 1322 content_settings::CookieSettings* cookie_settings) {
1321 DCHECK(!cookie_settings_.get()); 1323 DCHECK(!cookie_settings_.get());
1322 cookie_settings_ = cookie_settings; 1324 cookie_settings_ = cookie_settings;
1323 } 1325 }
1324 1326
1325 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1327 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1326 const GURL& url) const { 1328 const GURL& url) const {
1327 return url_blacklist_manager_->GetURLBlacklistState(url); 1329 return url_blacklist_manager_->GetURLBlacklistState(url);
1328 } 1330 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698