Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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); |
|
mmenke
2017/06/07 21:31:25
Does this DCHECK get us anything?
tbansal1
2017/06/08 05:01:49
Done.
| |
| 1316 if (!IsOffTheRecord()) { | |
| 1316 session_context.socket_performance_watcher_factory = | 1317 session_context.socket_performance_watcher_factory = |
| 1317 io_thread->globals() | 1318 io_thread->globals() |
| 1318 ->network_quality_estimator->GetSocketPerformanceWatcherFactory(); | 1319 ->network_quality_estimator->GetSocketPerformanceWatcherFactory(); |
| 1319 } | 1320 } |
| 1320 if (data_reduction_proxy_io_data_.get()) { | 1321 if (data_reduction_proxy_io_data_.get()) { |
| 1321 session_context.proxy_delegate = | 1322 session_context.proxy_delegate = |
| 1322 data_reduction_proxy_io_data_->proxy_delegate(); | 1323 data_reduction_proxy_io_data_->proxy_delegate(); |
| 1323 } | 1324 } |
| 1324 | 1325 |
| 1325 return std::unique_ptr<net::HttpNetworkSession>(new net::HttpNetworkSession( | 1326 return std::unique_ptr<net::HttpNetworkSession>(new net::HttpNetworkSession( |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 1356 void ProfileIOData::SetCookieSettingsForTesting( | 1357 void ProfileIOData::SetCookieSettingsForTesting( |
| 1357 content_settings::CookieSettings* cookie_settings) { | 1358 content_settings::CookieSettings* cookie_settings) { |
| 1358 DCHECK(!cookie_settings_.get()); | 1359 DCHECK(!cookie_settings_.get()); |
| 1359 cookie_settings_ = cookie_settings; | 1360 cookie_settings_ = cookie_settings; |
| 1360 } | 1361 } |
| 1361 | 1362 |
| 1362 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1363 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1363 const GURL& url) const { | 1364 const GURL& url) const { |
| 1364 return url_blacklist_manager_->GetURLBlacklistState(url); | 1365 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1365 } | 1366 } |
| OLD | NEW |