| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 #if defined(ENABLE_MANAGED_USERS) | 88 #if defined(ENABLE_MANAGED_USERS) |
| 89 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" | 89 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" |
| 90 #include "chrome/browser/managed_mode/managed_user_service.h" | 90 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 91 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 91 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 #if defined(OS_CHROMEOS) | 94 #if defined(OS_CHROMEOS) |
| 95 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" | 95 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" |
| 96 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 96 #include "chrome/browser/chromeos/login/user.h" | 97 #include "chrome/browser/chromeos/login/user.h" |
| 97 #include "chrome/browser/chromeos/login/user_manager.h" | 98 #include "chrome/browser/chromeos/login/user_manager.h" |
| 98 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 99 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 99 #include "chrome/browser/chromeos/policy/policy_cert_service.h" | 100 #include "chrome/browser/chromeos/policy/policy_cert_service.h" |
| 100 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" | 101 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" |
| 101 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" | 102 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" |
| 102 #include "chrome/browser/chromeos/settings/cros_settings.h" | 103 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 103 #include "chromeos/dbus/cryptohome_client.h" | 104 #include "chromeos/dbus/cryptohome_client.h" |
| 104 #include "chromeos/dbus/dbus_thread_manager.h" | 105 #include "chromeos/dbus/dbus_thread_manager.h" |
| 105 #include "chromeos/settings/cros_settings_names.h" | 106 #include "chromeos/settings/cros_settings_names.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 436 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
| 436 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 437 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
| 437 #if defined(ENABLE_CONFIGURATION_POLICY) | 438 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 438 policy::URLBlacklist::SegmentURLCallback callback = | 439 policy::URLBlacklist::SegmentURLCallback callback = |
| 439 static_cast<policy::URLBlacklist::SegmentURLCallback>( | 440 static_cast<policy::URLBlacklist::SegmentURLCallback>( |
| 440 URLFixerUpper::SegmentURL); | 441 URLFixerUpper::SegmentURL); |
| 441 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | 442 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); |
| 442 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 443 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
| 443 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); | 444 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); |
| 444 url_blacklist_manager_.reset( | 445 url_blacklist_manager_.reset( |
| 445 new policy::URLBlacklistManager(pref_service, | 446 new policy::URLBlacklistManager( |
| 446 background_task_runner, | 447 pref_service, |
| 447 io_message_loop_proxy, | 448 background_task_runner, |
| 448 callback, | 449 io_message_loop_proxy, |
| 449 policy::OverrideBlacklistForURL)); | 450 callback, |
| 451 base::Bind(policy::OverrideBlacklistForURL))); |
| 450 | 452 |
| 451 if (!IsOffTheRecord()) { | 453 if (!IsOffTheRecord()) { |
| 452 // Add policy headers for non-incognito requests. | 454 // Add policy headers for non-incognito requests. |
| 453 policy::PolicyHeaderService* policy_header_service = | 455 policy::PolicyHeaderService* policy_header_service = |
| 454 policy::PolicyHeaderServiceFactory::GetForBrowserContext(profile); | 456 policy::PolicyHeaderServiceFactory::GetForBrowserContext(profile); |
| 455 if (policy_header_service) { | 457 if (policy_header_service) { |
| 456 policy_header_helper_ = policy_header_service->CreatePolicyHeaderIOHelper( | 458 policy_header_helper_ = policy_header_service->CreatePolicyHeaderIOHelper( |
| 457 io_message_loop_proxy); | 459 io_message_loop_proxy); |
| 458 } | 460 } |
| 459 } | 461 } |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 void ProfileIOData::SetCookieSettingsForTesting( | 1165 void ProfileIOData::SetCookieSettingsForTesting( |
| 1164 CookieSettings* cookie_settings) { | 1166 CookieSettings* cookie_settings) { |
| 1165 DCHECK(!cookie_settings_.get()); | 1167 DCHECK(!cookie_settings_.get()); |
| 1166 cookie_settings_ = cookie_settings; | 1168 cookie_settings_ = cookie_settings; |
| 1167 } | 1169 } |
| 1168 | 1170 |
| 1169 void ProfileIOData::set_signin_names_for_testing( | 1171 void ProfileIOData::set_signin_names_for_testing( |
| 1170 SigninNamesOnIOThread* signin_names) { | 1172 SigninNamesOnIOThread* signin_names) { |
| 1171 signin_names_.reset(signin_names); | 1173 signin_names_.reset(signin_names); |
| 1172 } | 1174 } |
| OLD | NEW |