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

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

Issue 2899313006: Plumb NQP to context and to http_proxy_client_socket_pool (Closed)
Patch Set: ps Created 3 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
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 std::unique_ptr<net::HttpNetworkSession> 1305 std::unique_ptr<net::HttpNetworkSession>
1306 ProfileIOData::CreateHttpNetworkSession( 1306 ProfileIOData::CreateHttpNetworkSession(
1307 const ProfileParams& profile_params) const { 1307 const ProfileParams& profile_params) const {
1308 net::URLRequestContext* context = main_request_context(); 1308 net::URLRequestContext* context = main_request_context();
1309 1309
1310 IOThread* const io_thread = profile_params.io_thread; 1310 IOThread* const io_thread = profile_params.io_thread;
1311 1311
1312 net::HttpNetworkSession::Context session_context; 1312 net::HttpNetworkSession::Context session_context;
1313 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( 1313 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
1314 context, &session_context); 1314 context, &session_context);
1315 if (!IsOffTheRecord() && io_thread->globals()->network_quality_estimator) { 1315 DCHECK(io_thread->globals()->network_quality_estimator);
1316 session_context.socket_performance_watcher_factory = 1316 session_context.socket_performance_watcher_factory =
1317 io_thread->globals() 1317 io_thread->globals()
1318 ->network_quality_estimator->GetSocketPerformanceWatcherFactory(); 1318 ->network_quality_estimator->GetSocketPerformanceWatcherFactory();
mmenke 2017/06/05 20:04:25 Is hooking this up in incognito mode a critical pa
tbansal1 2017/06/07 18:13:44 Done.
1319 } 1319 session_context.network_quality_estimator =
1320 io_thread->globals()->network_quality_estimator.get();
mmenke 2017/06/05 20:04:25 Not needed, since it's plugged into SetHttpNetwork
tbansal1 2017/06/07 18:13:44 Done.
1321
1320 if (data_reduction_proxy_io_data_.get()) { 1322 if (data_reduction_proxy_io_data_.get()) {
1321 session_context.proxy_delegate = 1323 session_context.proxy_delegate =
1322 data_reduction_proxy_io_data_->proxy_delegate(); 1324 data_reduction_proxy_io_data_->proxy_delegate();
1323 } 1325 }
1324 1326
1325 return std::unique_ptr<net::HttpNetworkSession>(new net::HttpNetworkSession( 1327 return std::unique_ptr<net::HttpNetworkSession>(new net::HttpNetworkSession(
1326 io_thread->NetworkSessionParams(), session_context)); 1328 io_thread->NetworkSessionParams(), session_context));
1327 } 1329 }
1328 1330
1329 std::unique_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( 1331 std::unique_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
(...skipping 26 matching lines...) Expand all
1356 void ProfileIOData::SetCookieSettingsForTesting( 1358 void ProfileIOData::SetCookieSettingsForTesting(
1357 content_settings::CookieSettings* cookie_settings) { 1359 content_settings::CookieSettings* cookie_settings) {
1358 DCHECK(!cookie_settings_.get()); 1360 DCHECK(!cookie_settings_.get());
1359 cookie_settings_ = cookie_settings; 1361 cookie_settings_ = cookie_settings;
1360 } 1362 }
1361 1363
1362 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1364 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1363 const GURL& url) const { 1365 const GURL& url) const {
1364 return url_blacklist_manager_->GetURLBlacklistState(url); 1366 return url_blacklist_manager_->GetURLBlacklistState(url);
1365 } 1367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698