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

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

Issue 1831383002: Add SocketWatcherFactory as a helper class to NQE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the SocketDelegate Created 4 years, 8 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 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 scoped_ptr<net::HttpNetworkSession> ProfileIOData::CreateHttpNetworkSession( 1285 scoped_ptr<net::HttpNetworkSession> ProfileIOData::CreateHttpNetworkSession(
1286 const ProfileParams& profile_params) const { 1286 const ProfileParams& profile_params) const {
1287 net::HttpNetworkSession::Params params; 1287 net::HttpNetworkSession::Params params;
1288 net::URLRequestContext* context = main_request_context(); 1288 net::URLRequestContext* context = main_request_context();
1289 1289
1290 IOThread* const io_thread = profile_params.io_thread; 1290 IOThread* const io_thread = profile_params.io_thread;
1291 1291
1292 io_thread->InitializeNetworkSessionParams(&params); 1292 io_thread->InitializeNetworkSessionParams(&params);
1293 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context, 1293 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context,
1294 &params); 1294 &params);
1295 if (!IsOffTheRecord()) { 1295 if (!IsOffTheRecord() && io_thread->globals()->network_quality_estimator) {
1296 params.socket_performance_watcher_factory = 1296 params.socket_performance_watcher_factory =
1297 io_thread->globals()->network_quality_estimator.get(); 1297 io_thread->globals()
1298 ->network_quality_estimator->GetSocketPerformanceWatcherFactory();
mmenke 2016/04/05 15:45:38 If this is a global, should it be hooked up to the
tbansal1 2016/04/05 17:30:38 That makes sense. I should move this to URLRequest
1298 } 1299 }
1299 if (data_reduction_proxy_io_data_.get()) 1300 if (data_reduction_proxy_io_data_.get())
1300 params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate(); 1301 params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate();
1301 1302
1302 return scoped_ptr<net::HttpNetworkSession>( 1303 return scoped_ptr<net::HttpNetworkSession>(
1303 new net::HttpNetworkSession(params)); 1304 new net::HttpNetworkSession(params));
1304 } 1305 }
1305 1306
1306 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( 1307 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
1307 net::HttpNetworkSession* session, 1308 net::HttpNetworkSession* session,
(...skipping 11 matching lines...) Expand all
1319 make_scoped_ptr(new DevToolsNetworkTransactionFactory( 1320 make_scoped_ptr(new DevToolsNetworkTransactionFactory(
1320 network_controller_handle_.GetController(), shared_session)), 1321 network_controller_handle_.GetController(), shared_session)),
1321 std::move(backend), true /* set_up_quic_server_info */)); 1322 std::move(backend), true /* set_up_quic_server_info */));
1322 } 1323 }
1323 1324
1324 void ProfileIOData::SetCookieSettingsForTesting( 1325 void ProfileIOData::SetCookieSettingsForTesting(
1325 content_settings::CookieSettings* cookie_settings) { 1326 content_settings::CookieSettings* cookie_settings) {
1326 DCHECK(!cookie_settings_.get()); 1327 DCHECK(!cookie_settings_.get());
1327 cookie_settings_ = cookie_settings; 1328 cookie_settings_ = cookie_settings;
1328 } 1329 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698