| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/policy/cloud/user_policy_signin_service_base.h" | 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/policy/browser_policy_connector.h" | 13 #include "chrome/browser/policy/browser_policy_connector.h" |
| 13 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" | 14 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" |
| 14 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" | 15 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/signin/signin_manager.h" | 17 #include "chrome/browser/signin/signin_manager.h" |
| 17 #include "chrome/browser/signin/signin_manager_factory.h" | 18 #include "chrome/browser/signin/signin_manager_factory.h" |
| 18 #include "chrome/common/chrome_notification_types.h" | |
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 | 21 |
| 22 namespace policy { | 22 namespace policy { |
| 23 | 23 |
| 24 UserPolicySigninServiceBase::UserPolicySigninServiceBase( | 24 UserPolicySigninServiceBase::UserPolicySigninServiceBase( |
| 25 Profile* profile) | 25 Profile* profile) |
| 26 : profile_(profile), | 26 : profile_(profile), |
| 27 weak_factory_(this) { | 27 weak_factory_(this) { |
| 28 if (profile_->GetPrefs()->GetBoolean(prefs::kDisableCloudPolicyOnSignin)) | 28 if (profile_->GetPrefs()->GetBoolean(prefs::kDisableCloudPolicyOnSignin)) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 UserCloudPolicyManager* manager = GetManager(); | 233 UserCloudPolicyManager* manager = GetManager(); |
| 234 if (manager) | 234 if (manager) |
| 235 manager->DisconnectAndRemovePolicy(); | 235 manager->DisconnectAndRemovePolicy(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() { | 238 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() { |
| 239 return UserCloudPolicyManagerFactory::GetForProfile(profile_); | 239 return UserCloudPolicyManagerFactory::GetForProfile(profile_); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace policy | 242 } // namespace policy |
| OLD | NEW |