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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 #if BUILDFLAG(ENABLE_EXTENSIONS) | 115 #if BUILDFLAG(ENABLE_EXTENSIONS) |
116 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h" | 116 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h" |
117 #include "extensions/browser/extension_protocols.h" | 117 #include "extensions/browser/extension_protocols.h" |
118 #include "extensions/browser/extension_system.h" | 118 #include "extensions/browser/extension_system.h" |
119 #include "extensions/browser/extension_throttle_manager.h" | 119 #include "extensions/browser/extension_throttle_manager.h" |
120 #include "extensions/browser/info_map.h" | 120 #include "extensions/browser/info_map.h" |
121 #include "extensions/common/constants.h" | 121 #include "extensions/common/constants.h" |
122 #endif | 122 #endif |
123 | 123 |
124 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | |
125 #include "chrome/browser/supervised_user/supervised_user_service.h" | |
126 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | |
127 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | |
128 #endif | |
129 | |
130 #if defined(OS_ANDROID) | 124 #if defined(OS_ANDROID) |
131 #include "content/public/browser/android/content_protocol_handler.h" | 125 #include "content/public/browser/android/content_protocol_handler.h" |
132 #endif // defined(OS_ANDROID) | 126 #endif // defined(OS_ANDROID) |
133 | 127 |
134 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
135 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" | 129 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" |
136 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice.h" | 130 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice.h" |
137 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice_factory.h" | 131 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice_factory.h" |
138 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" | 132 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" |
139 #include "chrome/browser/chromeos/login/startup_utils.h" | 133 #include "chrome/browser/chromeos/login/startup_utils.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 409 |
416 NewTabPageInterceptorService* new_tab_interceptor_service = | 410 NewTabPageInterceptorService* new_tab_interceptor_service = |
417 NewTabPageInterceptorServiceFactory::GetForProfile(profile); | 411 NewTabPageInterceptorServiceFactory::GetForProfile(profile); |
418 if (new_tab_interceptor_service) { | 412 if (new_tab_interceptor_service) { |
419 params->new_tab_page_interceptor = | 413 params->new_tab_page_interceptor = |
420 new_tab_interceptor_service->CreateInterceptor(); | 414 new_tab_interceptor_service->CreateInterceptor(); |
421 } | 415 } |
422 | 416 |
423 params->proxy_config_service = ProxyServiceFactory::CreateProxyConfigService( | 417 params->proxy_config_service = ProxyServiceFactory::CreateProxyConfigService( |
424 profile->GetProxyConfigTracker()); | 418 profile->GetProxyConfigTracker()); |
425 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | |
426 SupervisedUserService* supervised_user_service = | |
427 SupervisedUserServiceFactory::GetForProfile(profile); | |
428 params->supervised_user_url_filter = | |
429 supervised_user_service->GetURLFilterForIOThread(); | |
430 #endif | |
431 #if defined(OS_CHROMEOS) | 419 #if defined(OS_CHROMEOS) |
432 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 420 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
433 if (user_manager) { | 421 if (user_manager) { |
434 const user_manager::User* user = | 422 const user_manager::User* user = |
435 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 423 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
436 // No need to initialize NSS for users with empty username hash: | 424 // No need to initialize NSS for users with empty username hash: |
437 // Getters for a user's NSS slots always return NULL slot if the user's | 425 // Getters for a user's NSS slots always return NULL slot if the user's |
438 // username hash is empty, even when the NSS is not initialized for the | 426 // username hash is empty, even when the NSS is not initialized for the |
439 // user. | 427 // user. |
440 if (user && !user->username_hash().empty()) { | 428 if (user && !user->username_hash().empty()) { |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 #endif | 1059 #endif |
1072 | 1060 |
1073 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); | 1061 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); |
1074 resource_context_->request_context_ = main_request_context_.get(); | 1062 resource_context_->request_context_ = main_request_context_.get(); |
1075 | 1063 |
1076 if (profile_params_->resource_prefetch_predictor_observer_) { | 1064 if (profile_params_->resource_prefetch_predictor_observer_) { |
1077 resource_prefetch_predictor_observer_.reset( | 1065 resource_prefetch_predictor_observer_.reset( |
1078 profile_params_->resource_prefetch_predictor_observer_.release()); | 1066 profile_params_->resource_prefetch_predictor_observer_.release()); |
1079 } | 1067 } |
1080 | 1068 |
1081 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | |
1082 supervised_user_url_filter_ = profile_params_->supervised_user_url_filter; | |
1083 #endif | |
1084 | |
1085 #if defined(OS_CHROMEOS) | 1069 #if defined(OS_CHROMEOS) |
1086 username_hash_ = profile_params_->username_hash; | 1070 username_hash_ = profile_params_->username_hash; |
1087 use_system_key_slot_ = profile_params_->use_system_key_slot; | 1071 use_system_key_slot_ = profile_params_->use_system_key_slot; |
1088 if (use_system_key_slot_) | 1072 if (use_system_key_slot_) |
1089 EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); | 1073 EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); |
1090 | 1074 |
1091 certificate_provider_ = std::move(profile_params_->certificate_provider); | 1075 certificate_provider_ = std::move(profile_params_->certificate_provider); |
1092 #endif | 1076 #endif |
1093 | 1077 |
1094 if (g_cert_verifier_for_testing) { | 1078 if (g_cert_verifier_for_testing) { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 void ProfileIOData::SetCookieSettingsForTesting( | 1311 void ProfileIOData::SetCookieSettingsForTesting( |
1328 content_settings::CookieSettings* cookie_settings) { | 1312 content_settings::CookieSettings* cookie_settings) { |
1329 DCHECK(!cookie_settings_.get()); | 1313 DCHECK(!cookie_settings_.get()); |
1330 cookie_settings_ = cookie_settings; | 1314 cookie_settings_ = cookie_settings; |
1331 } | 1315 } |
1332 | 1316 |
1333 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1317 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1334 const GURL& url) const { | 1318 const GURL& url) const { |
1335 return url_blacklist_manager_->GetURLBlacklistState(url); | 1319 return url_blacklist_manager_->GetURLBlacklistState(url); |
1336 } | 1320 } |
OLD | NEW |