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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 net::ChannelIDService* channel_id_service) const { | 1301 net::ChannelIDService* channel_id_service) const { |
1302 channel_id_service_.reset(channel_id_service); | 1302 channel_id_service_.reset(channel_id_service); |
1303 } | 1303 } |
1304 | 1304 |
1305 void ProfileIOData::DestroyResourceContext() { | 1305 void ProfileIOData::DestroyResourceContext() { |
1306 resource_context_.reset(); | 1306 resource_context_.reset(); |
1307 // Prevent the cert_transparency_observer_ from getting any more | 1307 // Prevent the cert_transparency_observer_ from getting any more |
1308 // notifications by severing the link between it and the | 1308 // notifications by severing the link between it and the |
1309 // cert_transparency_verifier_ and unregistering it from new STH | 1309 // cert_transparency_verifier_ and unregistering it from new STH |
1310 // notifications. | 1310 // notifications. |
1311 cert_transparency_verifier_->SetObserver(nullptr); | 1311 if (cert_transparency_verifier_) |
1312 ct_tree_tracker_unregistration_.Run(); | 1312 cert_transparency_verifier_->SetObserver(nullptr); |
| 1313 if (!ct_tree_tracker_unregistration_.is_null()) |
| 1314 ct_tree_tracker_unregistration_.Run(); |
1313 } | 1315 } |
1314 | 1316 |
1315 std::unique_ptr<net::HttpNetworkSession> | 1317 std::unique_ptr<net::HttpNetworkSession> |
1316 ProfileIOData::CreateHttpNetworkSession( | 1318 ProfileIOData::CreateHttpNetworkSession( |
1317 const ProfileParams& profile_params) const { | 1319 const ProfileParams& profile_params) const { |
1318 net::URLRequestContext* context = main_request_context(); | 1320 net::URLRequestContext* context = main_request_context(); |
1319 | 1321 |
1320 IOThread* const io_thread = profile_params.io_thread; | 1322 IOThread* const io_thread = profile_params.io_thread; |
1321 | 1323 |
1322 net::HttpNetworkSession::Params params(io_thread->NetworkSessionParams()); | 1324 net::HttpNetworkSession::Params params(io_thread->NetworkSessionParams()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 void ProfileIOData::SetCookieSettingsForTesting( | 1357 void ProfileIOData::SetCookieSettingsForTesting( |
1356 content_settings::CookieSettings* cookie_settings) { | 1358 content_settings::CookieSettings* cookie_settings) { |
1357 DCHECK(!cookie_settings_.get()); | 1359 DCHECK(!cookie_settings_.get()); |
1358 cookie_settings_ = cookie_settings; | 1360 cookie_settings_ = cookie_settings; |
1359 } | 1361 } |
1360 | 1362 |
1361 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1363 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1362 const GURL& url) const { | 1364 const GURL& url) const { |
1363 return url_blacklist_manager_->GetURLBlacklistState(url); | 1365 return url_blacklist_manager_->GetURLBlacklistState(url); |
1364 } | 1366 } |
OLD | NEW |