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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 return std::unique_ptr<net::HttpNetworkSession>( | 1297 return std::unique_ptr<net::HttpNetworkSession>( |
1298 new net::HttpNetworkSession(params)); | 1298 new net::HttpNetworkSession(params)); |
1299 } | 1299 } |
1300 | 1300 |
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 /* is_main_cache */); |
1308 } | 1308 } |
1309 | 1309 |
1310 std::unique_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory( | 1310 std::unique_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory( |
1311 net::HttpTransactionFactory* main_http_factory, | 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); | 1313 DCHECK(main_http_factory); |
1314 net::HttpNetworkSession* shared_session = main_http_factory->GetSession(); | 1314 net::HttpNetworkSession* shared_session = main_http_factory->GetSession(); |
1315 return base::MakeUnique<net::HttpCache>( | 1315 return base::MakeUnique<net::HttpCache>( |
1316 base::WrapUnique(new DevToolsNetworkTransactionFactory( | 1316 base::WrapUnique(new DevToolsNetworkTransactionFactory( |
1317 network_controller_handle_.GetController(), shared_session)), | 1317 network_controller_handle_.GetController(), shared_session)), |
1318 std::move(backend), false /* set_up_quic_server_info */); | 1318 std::move(backend), false /* is_main_cache */); |
1319 } | 1319 } |
1320 | 1320 |
1321 void ProfileIOData::SetCookieSettingsForTesting( | 1321 void ProfileIOData::SetCookieSettingsForTesting( |
1322 content_settings::CookieSettings* cookie_settings) { | 1322 content_settings::CookieSettings* cookie_settings) { |
1323 DCHECK(!cookie_settings_.get()); | 1323 DCHECK(!cookie_settings_.get()); |
1324 cookie_settings_ = cookie_settings; | 1324 cookie_settings_ = cookie_settings; |
1325 } | 1325 } |
1326 | 1326 |
1327 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1327 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1328 const GURL& url) const { | 1328 const GURL& url) const { |
1329 return url_blacklist_manager_->GetURLBlacklistState(url); | 1329 return url_blacklist_manager_->GetURLBlacklistState(url); |
1330 } | 1330 } |
OLD | NEW |