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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #if defined(ENABLE_CONFIGURATION_POLICY) | 82 #if defined(ENABLE_CONFIGURATION_POLICY) |
83 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" | 83 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" |
84 #include "chrome/browser/policy/policy_helpers.h" | 84 #include "chrome/browser/policy/policy_helpers.h" |
85 #include "components/policy/core/browser/url_blacklist_manager.h" | 85 #include "components/policy/core/browser/url_blacklist_manager.h" |
86 #include "components/policy/core/common/cloud/policy_header_io_helper.h" | 86 #include "components/policy/core/common/cloud/policy_header_io_helper.h" |
87 #include "components/policy/core/common/cloud/policy_header_service.h" | 87 #include "components/policy/core/common/cloud/policy_header_service.h" |
88 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" | 88 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" |
89 #endif | 89 #endif |
90 | 90 |
91 #if defined(ENABLE_MANAGED_USERS) | 91 #if defined(ENABLE_MANAGED_USERS) |
92 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" | 92 #include "chrome/browser/supervised_user/supervised_user_service.h" |
93 #include "chrome/browser/managed_mode/managed_user_service.h" | 93 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
94 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 94 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
95 #endif | 95 #endif |
96 | 96 |
97 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
98 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" | 98 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" |
99 #include "chrome/browser/chromeos/login/startup_utils.h" | 99 #include "chrome/browser/chromeos/login/startup_utils.h" |
100 #include "chrome/browser/chromeos/login/users/user.h" | 100 #include "chrome/browser/chromeos/login/users/user.h" |
101 #include "chrome/browser/chromeos/login/users/user_manager.h" | 101 #include "chrome/browser/chromeos/login/users/user_manager.h" |
102 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 102 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
103 #include "chrome/browser/chromeos/policy/policy_cert_service.h" | 103 #include "chrome/browser/chromeos/policy/policy_cert_service.h" |
104 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" | 104 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // The profile instance is only available here in the InitializeOnUIThread | 336 // The profile instance is only available here in the InitializeOnUIThread |
337 // method, so we create the url job factory here, then save it for | 337 // method, so we create the url job factory here, then save it for |
338 // later delivery to the job factory in Init(). | 338 // later delivery to the job factory in Init(). |
339 params->protocol_handler_interceptor = | 339 params->protocol_handler_interceptor = |
340 protocol_handler_registry->CreateJobInterceptorFactory(); | 340 protocol_handler_registry->CreateJobInterceptorFactory(); |
341 | 341 |
342 params->proxy_config_service | 342 params->proxy_config_service |
343 .reset(ProxyServiceFactory::CreateProxyConfigService( | 343 .reset(ProxyServiceFactory::CreateProxyConfigService( |
344 profile->GetProxyConfigTracker())); | 344 profile->GetProxyConfigTracker())); |
345 #if defined(ENABLE_MANAGED_USERS) | 345 #if defined(ENABLE_MANAGED_USERS) |
346 ManagedUserService* managed_user_service = | 346 SupervisedUserService* supervised_user_service = |
347 ManagedUserServiceFactory::GetForProfile(profile); | 347 SupervisedUserServiceFactory::GetForProfile(profile); |
348 params->managed_mode_url_filter = | 348 params->supervised_user_url_filter = |
349 managed_user_service->GetURLFilterForIOThread(); | 349 supervised_user_service->GetURLFilterForIOThread(); |
350 #endif | 350 #endif |
351 #if defined(OS_CHROMEOS) | 351 #if defined(OS_CHROMEOS) |
352 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 352 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
353 if (user_manager) { | 353 if (user_manager) { |
354 chromeos::User* user = user_manager->GetUserByProfile(profile); | 354 chromeos::User* user = user_manager->GetUserByProfile(profile); |
355 if (user) { | 355 if (user) { |
356 params->username_hash = user->username_hash(); | 356 params->username_hash = user->username_hash(); |
357 bool is_primary_user = (user_manager->GetPrimaryUser() == user); | 357 bool is_primary_user = (user_manager->GetPrimaryUser() == user); |
358 BrowserThread::PostTask(BrowserThread::IO, | 358 BrowserThread::PostTask(BrowserThread::IO, |
359 FROM_HERE, | 359 FROM_HERE, |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 982 |
983 // Take ownership over these parameters. | 983 // Take ownership over these parameters. |
984 cookie_settings_ = profile_params_->cookie_settings; | 984 cookie_settings_ = profile_params_->cookie_settings; |
985 host_content_settings_map_ = profile_params_->host_content_settings_map; | 985 host_content_settings_map_ = profile_params_->host_content_settings_map; |
986 extension_info_map_ = profile_params_->extension_info_map; | 986 extension_info_map_ = profile_params_->extension_info_map; |
987 | 987 |
988 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); | 988 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); |
989 resource_context_->request_context_ = main_request_context_.get(); | 989 resource_context_->request_context_ = main_request_context_.get(); |
990 | 990 |
991 #if defined(ENABLE_MANAGED_USERS) | 991 #if defined(ENABLE_MANAGED_USERS) |
992 managed_mode_url_filter_ = profile_params_->managed_mode_url_filter; | 992 supervised_user_url_filter_ = profile_params_->supervised_user_url_filter; |
993 #endif | 993 #endif |
994 | 994 |
995 #if defined(OS_CHROMEOS) | 995 #if defined(OS_CHROMEOS) |
996 username_hash_ = profile_params_->username_hash; | 996 username_hash_ = profile_params_->username_hash; |
997 scoped_refptr<net::CertVerifyProc> verify_proc; | 997 scoped_refptr<net::CertVerifyProc> verify_proc; |
998 crypto::ScopedPK11Slot public_slot = | 998 crypto::ScopedPK11Slot public_slot = |
999 crypto::GetPublicSlotForChromeOSUser(username_hash_); | 999 crypto::GetPublicSlotForChromeOSUser(username_hash_); |
1000 // The private slot won't be ready by this point. It shouldn't be necessary | 1000 // The private slot won't be ready by this point. It shouldn't be necessary |
1001 // for cert trust purposes anyway. | 1001 // for cert trust purposes anyway. |
1002 verify_proc = new chromeos::CertVerifyProcChromeOS(public_slot.Pass()); | 1002 verify_proc = new chromeos::CertVerifyProcChromeOS(public_slot.Pass()); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 void ProfileIOData::SetCookieSettingsForTesting( | 1191 void ProfileIOData::SetCookieSettingsForTesting( |
1192 CookieSettings* cookie_settings) { | 1192 CookieSettings* cookie_settings) { |
1193 DCHECK(!cookie_settings_.get()); | 1193 DCHECK(!cookie_settings_.get()); |
1194 cookie_settings_ = cookie_settings; | 1194 cookie_settings_ = cookie_settings; |
1195 } | 1195 } |
1196 | 1196 |
1197 void ProfileIOData::set_signin_names_for_testing( | 1197 void ProfileIOData::set_signin_names_for_testing( |
1198 SigninNamesOnIOThread* signin_names) { | 1198 SigninNamesOnIOThread* signin_names) { |
1199 signin_names_.reset(signin_names); | 1199 signin_names_.reset(signin_names); |
1200 } | 1200 } |
OLD | NEW |