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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 #include "extensions/common/constants.h" | 119 #include "extensions/common/constants.h" |
| 120 #endif | 120 #endif |
| 121 | 121 |
| 122 #if defined(ENABLE_SUPERVISED_USERS) | 122 #if defined(ENABLE_SUPERVISED_USERS) |
| 123 #include "chrome/browser/supervised_user/supervised_user_service.h" | 123 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 124 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 124 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 125 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 125 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(OS_ANDROID) | 128 #if defined(OS_ANDROID) |
| 129 #include "chrome/browser/android/offline_pages/offline_page_request_handler.h" | |
| 129 #include "content/public/browser/android/content_protocol_handler.h" | 130 #include "content/public/browser/android/content_protocol_handler.h" |
| 130 #endif // defined(OS_ANDROID) | 131 #endif // defined(OS_ANDROID) |
| 131 | 132 |
| 132 #if defined(OS_CHROMEOS) | 133 #if defined(OS_CHROMEOS) |
| 133 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" | 134 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" |
| 134 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice.h" | 135 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice.h" |
| 135 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice_factory.h" | 136 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice_factory.h" |
| 136 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" | 137 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" |
| 137 #include "chrome/browser/chromeos/login/startup_utils.h" | 138 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 138 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 139 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1154 io_thread_globals->cert_verifier.get()); | 1155 io_thread_globals->cert_verifier.get()); |
| 1155 #endif | 1156 #endif |
| 1156 } | 1157 } |
| 1157 | 1158 |
| 1158 // Install the New Tab Page Interceptor. | 1159 // Install the New Tab Page Interceptor. |
| 1159 if (profile_params_->new_tab_page_interceptor.get()) { | 1160 if (profile_params_->new_tab_page_interceptor.get()) { |
| 1160 request_interceptors.push_back( | 1161 request_interceptors.push_back( |
| 1161 profile_params_->new_tab_page_interceptor.release()); | 1162 profile_params_->new_tab_page_interceptor.release()); |
| 1162 } | 1163 } |
| 1163 | 1164 |
| 1165 // Install the Offline Page Interceptor. | |
| 1166 #if defined(OS_ANDROID) | |
| 1167 std::unique_ptr<net::URLRequestInterceptor> offline_page_interceptor = | |
| 1168 offline_pages::OfflinePageRequestHandler::CreateInterceptor( | |
| 1169 profile_params_->profile); | |
| 1170 if (offline_page_interceptor.get()) | |
| 1171 request_interceptors.push_back(offline_page_interceptor.release()); | |
| 1172 #endif | |
|
mmenke
2016/08/10 20:20:17
I don't think we want this in incognito mode. Mov
jianli
2016/08/10 21:37:25
Done.
| |
| 1173 | |
| 1164 std::unique_ptr<net::MultiLogCTVerifier> ct_verifier( | 1174 std::unique_ptr<net::MultiLogCTVerifier> ct_verifier( |
| 1165 new net::MultiLogCTVerifier()); | 1175 new net::MultiLogCTVerifier()); |
| 1166 ct_verifier->AddLogs(io_thread_globals->ct_logs); | 1176 ct_verifier->AddLogs(io_thread_globals->ct_logs); |
| 1167 main_request_context_->set_cert_transparency_verifier(ct_verifier.get()); | 1177 main_request_context_->set_cert_transparency_verifier(ct_verifier.get()); |
| 1168 | 1178 |
| 1169 ct_tree_tracker_.reset(new certificate_transparency::TreeStateTracker( | 1179 ct_tree_tracker_.reset(new certificate_transparency::TreeStateTracker( |
| 1170 io_thread_globals->ct_logs)); | 1180 io_thread_globals->ct_logs)); |
| 1171 ct_verifier->SetObserver(ct_tree_tracker_.get()); | 1181 ct_verifier->SetObserver(ct_tree_tracker_.get()); |
| 1172 | 1182 |
| 1173 cert_transparency_verifier_ = std::move(ct_verifier); | 1183 cert_transparency_verifier_ = std::move(ct_verifier); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1375 void ProfileIOData::SetCookieSettingsForTesting( | 1385 void ProfileIOData::SetCookieSettingsForTesting( |
| 1376 content_settings::CookieSettings* cookie_settings) { | 1386 content_settings::CookieSettings* cookie_settings) { |
| 1377 DCHECK(!cookie_settings_.get()); | 1387 DCHECK(!cookie_settings_.get()); |
| 1378 cookie_settings_ = cookie_settings; | 1388 cookie_settings_ = cookie_settings; |
| 1379 } | 1389 } |
| 1380 | 1390 |
| 1381 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1391 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1382 const GURL& url) const { | 1392 const GURL& url) const { |
| 1383 return url_blacklist_manager_->GetURLBlacklistState(url); | 1393 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1384 } | 1394 } |
| OLD | NEW |