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

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: Rebased 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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 1284
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::URLRequestContext* context = main_request_context(); 1287 net::URLRequestContext* context = main_request_context();
1288 1288
1289 IOThread* const io_thread = profile_params.io_thread; 1289 IOThread* const io_thread = profile_params.io_thread;
1290 1290
1291 net::HttpNetworkSession::Params params(io_thread->NetworkSessionParams()); 1291 net::HttpNetworkSession::Params params(io_thread->NetworkSessionParams());
1292 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context, 1292 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context,
1293 &params); 1293 &params);
1294 if (!IsOffTheRecord()) { 1294 if (!IsOffTheRecord() && io_thread->globals()->network_quality_estimator) {
1295 params.socket_performance_watcher_factory = 1295 params.socket_performance_watcher_factory =
1296 io_thread->globals()->network_quality_estimator.get(); 1296 io_thread->globals()
1297 ->network_quality_estimator->GetSocketPerformanceWatcherFactory();
1297 } 1298 }
1298 if (data_reduction_proxy_io_data_.get()) 1299 if (data_reduction_proxy_io_data_.get())
1299 params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate(); 1300 params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate();
1300 1301
1301 return scoped_ptr<net::HttpNetworkSession>( 1302 return scoped_ptr<net::HttpNetworkSession>(
1302 new net::HttpNetworkSession(params)); 1303 new net::HttpNetworkSession(params));
1303 } 1304 }
1304 1305
1305 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( 1306 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
1306 net::HttpNetworkSession* session, 1307 net::HttpNetworkSession* session,
(...skipping 11 matching lines...) Expand all
1318 make_scoped_ptr(new DevToolsNetworkTransactionFactory( 1319 make_scoped_ptr(new DevToolsNetworkTransactionFactory(
1319 network_controller_handle_.GetController(), shared_session)), 1320 network_controller_handle_.GetController(), shared_session)),
1320 std::move(backend), true /* set_up_quic_server_info */)); 1321 std::move(backend), true /* set_up_quic_server_info */));
1321 } 1322 }
1322 1323
1323 void ProfileIOData::SetCookieSettingsForTesting( 1324 void ProfileIOData::SetCookieSettingsForTesting(
1324 content_settings::CookieSettings* cookie_settings) { 1325 content_settings::CookieSettings* cookie_settings) {
1325 DCHECK(!cookie_settings_.get()); 1326 DCHECK(!cookie_settings_.get());
1326 cookie_settings_ = cookie_settings; 1327 cookie_settings_ = cookie_settings;
1327 } 1328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698