Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 53923004: policy: Make UserNetworkConfigurationUpdater a BCKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 #if defined(ENABLE_MANAGED_USERS) 85 #if defined(ENABLE_MANAGED_USERS)
86 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" 86 #include "chrome/browser/managed_mode/managed_mode_url_filter.h"
87 #include "chrome/browser/managed_mode/managed_user_service.h" 87 #include "chrome/browser/managed_mode/managed_user_service.h"
88 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 88 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
89 #endif 89 #endif
90 90
91 #if defined(OS_CHROMEOS) 91 #if defined(OS_CHROMEOS)
92 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h" 92 #include "chrome/browser/chromeos/drive/drive_protocol_handler.h"
93 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" 93 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
94 #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h"
95 #include "chrome/browser/chromeos/policy/user_network_configuration_updater_fact ory.h"
94 #include "chrome/browser/chromeos/settings/cros_settings.h" 96 #include "chrome/browser/chromeos/settings/cros_settings.h"
95 #include "chrome/browser/policy/profile_policy_connector.h" 97 #include "chrome/browser/policy/profile_policy_connector.h"
96 #include "chrome/browser/policy/profile_policy_connector_factory.h" 98 #include "chrome/browser/policy/profile_policy_connector_factory.h"
97 #include "chromeos/settings/cros_settings_names.h" 99 #include "chromeos/settings/cros_settings_names.h"
98 #endif // defined(OS_CHROMEOS) 100 #endif // defined(OS_CHROMEOS)
99 101
100 using content::BrowserContext; 102 using content::BrowserContext;
101 using content::BrowserThread; 103 using content::BrowserThread;
102 using content::ResourceContext; 104 using content::ResourceContext;
103 105
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 Profile* profile) { 232 Profile* profile) {
231 policy::ProfilePolicyConnector* connector = 233 policy::ProfilePolicyConnector* connector =
232 policy::ProfilePolicyConnectorFactory::GetForProfile(profile); 234 policy::ProfilePolicyConnectorFactory::GetForProfile(profile);
233 base::Closure policy_cert_trusted_callback = 235 base::Closure policy_cert_trusted_callback =
234 base::Bind(base::IgnoreResult(&content::BrowserThread::PostTask), 236 base::Bind(base::IgnoreResult(&content::BrowserThread::PostTask),
235 content::BrowserThread::UI, 237 content::BrowserThread::UI,
236 FROM_HERE, 238 FROM_HERE,
237 connector->GetPolicyCertTrustedCallback()); 239 connector->GetPolicyCertTrustedCallback());
238 scoped_ptr<policy::PolicyCertVerifier> cert_verifier( 240 scoped_ptr<policy::PolicyCertVerifier> cert_verifier(
239 new policy::PolicyCertVerifier(policy_cert_trusted_callback)); 241 new policy::PolicyCertVerifier(policy_cert_trusted_callback));
240 connector->SetPolicyCertVerifier(cert_verifier.get()); 242 policy::UserNetworkConfigurationUpdater* network_configuration_updater =
243 policy::UserNetworkConfigurationUpdaterFactory::GetForProfile(profile);
244 if (network_configuration_updater)
245 network_configuration_updater->SetPolicyCertVerifier(cert_verifier.get());
241 return cert_verifier.Pass(); 246 return cert_verifier.Pass();
242 } 247 }
243 #endif 248 #endif
244 } // namespace 249 } // namespace
245 250
246 void ProfileIOData::InitializeOnUIThread(Profile* profile) { 251 void ProfileIOData::InitializeOnUIThread(Profile* profile) {
247 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
248 PrefService* pref_service = profile->GetPrefs(); 253 PrefService* pref_service = profile->GetPrefs();
249 PrefService* local_state_pref_service = g_browser_process->local_state(); 254 PrefService* local_state_pref_service = g_browser_process->local_state();
250 255
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 void ProfileIOData::SetCookieSettingsForTesting( 998 void ProfileIOData::SetCookieSettingsForTesting(
994 CookieSettings* cookie_settings) { 999 CookieSettings* cookie_settings) {
995 DCHECK(!cookie_settings_.get()); 1000 DCHECK(!cookie_settings_.get());
996 cookie_settings_ = cookie_settings; 1001 cookie_settings_ = cookie_settings;
997 } 1002 }
998 1003
999 void ProfileIOData::set_signin_names_for_testing( 1004 void ProfileIOData::set_signin_names_for_testing(
1000 SigninNamesOnIOThread* signin_names) { 1005 SigninNamesOnIOThread* signin_names) {
1001 signin_names_.reset(signin_names); 1006 signin_names_.reset(signin_names);
1002 } 1007 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698