| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #include "net/url_request/url_request_job_factory_impl.h" | 81 #include "net/url_request/url_request_job_factory_impl.h" |
| 82 | 82 |
| 83 #if defined(ENABLE_MANAGED_USERS) | 83 #if defined(ENABLE_MANAGED_USERS) |
| 84 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" | 84 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" |
| 85 #include "chrome/browser/managed_mode/managed_user_service.h" | 85 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 86 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 86 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 #if defined(OS_CHROMEOS) | 89 #if defined(OS_CHROMEOS) |
| 90 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" | 90 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" |
| 91 #include "chrome/browser/chromeos/policy/network_policy_service.h" |
| 92 #include "chrome/browser/chromeos/policy/network_policy_service_factory.h" |
| 91 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" | 93 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" |
| 92 #include "chrome/browser/chromeos/settings/cros_settings.h" | 94 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 93 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 95 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 94 #include "chrome/browser/policy/profile_policy_connector.h" | |
| 95 #include "chrome/browser/policy/profile_policy_connector_factory.h" | |
| 96 #endif // defined(OS_CHROMEOS) | 96 #endif // defined(OS_CHROMEOS) |
| 97 | 97 |
| 98 using content::BrowserContext; | 98 using content::BrowserContext; |
| 99 using content::BrowserThread; | 99 using content::BrowserThread; |
| 100 using content::ResourceContext; | 100 using content::ResourceContext; |
| 101 | 101 |
| 102 namespace { | 102 namespace { |
| 103 | 103 |
| 104 // ---------------------------------------------------------------------------- | 104 // ---------------------------------------------------------------------------- |
| 105 // CookieMonster::Delegate implementation | 105 // CookieMonster::Delegate implementation |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 219 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| 220 | 220 |
| 221 return NULL; | 221 return NULL; |
| 222 } | 222 } |
| 223 }; | 223 }; |
| 224 #endif // defined(DEBUG_DEVTOOLS) | 224 #endif // defined(DEBUG_DEVTOOLS) |
| 225 | 225 |
| 226 #if defined(OS_CHROMEOS) | 226 #if defined(OS_CHROMEOS) |
| 227 scoped_ptr<policy::PolicyCertVerifier> CreatePolicyCertVerifier( | 227 scoped_ptr<policy::PolicyCertVerifier> CreatePolicyCertVerifier( |
| 228 Profile* profile) { | 228 Profile* profile) { |
| 229 policy::ProfilePolicyConnector* connector = | 229 policy::NetworkPolicyService* service = |
| 230 policy::ProfilePolicyConnectorFactory::GetForProfile(profile); | 230 policy::NetworkPolicyServiceFactory::GetForProfile(profile); |
| 231 DCHECK(service); |
| 231 base::Closure policy_cert_trusted_callback = | 232 base::Closure policy_cert_trusted_callback = |
| 232 base::Bind(base::IgnoreResult(&content::BrowserThread::PostTask), | 233 base::Bind(base::IgnoreResult(&content::BrowserThread::PostTask), |
| 233 content::BrowserThread::UI, | 234 content::BrowserThread::UI, |
| 234 FROM_HERE, | 235 FROM_HERE, |
| 235 connector->GetPolicyCertTrustedCallback()); | 236 service->GetPolicyCertTrustedCallback()); |
| 236 scoped_ptr<policy::PolicyCertVerifier> cert_verifier( | 237 scoped_ptr<policy::PolicyCertVerifier> cert_verifier( |
| 237 new policy::PolicyCertVerifier(policy_cert_trusted_callback)); | 238 new policy::PolicyCertVerifier(policy_cert_trusted_callback)); |
| 238 connector->SetPolicyCertVerifier(cert_verifier.get()); | 239 service->SetPolicyCertVerifier(cert_verifier.get()); |
| 239 return cert_verifier.Pass(); | 240 return cert_verifier.Pass(); |
| 240 } | 241 } |
| 241 #endif | 242 #endif |
| 242 } // namespace | 243 } // namespace |
| 243 | 244 |
| 244 void ProfileIOData::InitializeOnUIThread(Profile* profile) { | 245 void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
| 245 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 246 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 246 PrefService* pref_service = profile->GetPrefs(); | 247 PrefService* pref_service = profile->GetPrefs(); |
| 247 PrefService* local_state_pref_service = g_browser_process->local_state(); | 248 PrefService* local_state_pref_service = g_browser_process->local_state(); |
| 248 | 249 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 void ProfileIOData::SetCookieSettingsForTesting( | 977 void ProfileIOData::SetCookieSettingsForTesting( |
| 977 CookieSettings* cookie_settings) { | 978 CookieSettings* cookie_settings) { |
| 978 DCHECK(!cookie_settings_.get()); | 979 DCHECK(!cookie_settings_.get()); |
| 979 cookie_settings_ = cookie_settings; | 980 cookie_settings_ = cookie_settings; |
| 980 } | 981 } |
| 981 | 982 |
| 982 void ProfileIOData::set_signin_names_for_testing( | 983 void ProfileIOData::set_signin_names_for_testing( |
| 983 SigninNamesOnIOThread* signin_names) { | 984 SigninNamesOnIOThread* signin_names) { |
| 984 signin_names_.reset(signin_names); | 985 signin_names_.reset(signin_names); |
| 985 } | 986 } |
| OLD | NEW |