| 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/policy/cloud/user_policy_signin_service.h" | 5 #include "chrome/browser/policy/cloud/user_policy_signin_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/policy/cloud/cloud_policy_client_registration_helper.h" | |
| 13 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" | 12 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 15 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
| 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 16 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 18 #include "chrome/browser/signin/signin_manager.h" | 17 #include "chrome/browser/signin/signin_manager.h" |
| 18 #include "components/policy/core/common/cloud/cloud_policy_client_registration_h
elper.h" |
| 19 #include "content/public/browser/notification_details.h" | 19 #include "content/public/browser/notification_details.h" |
| 20 #include "content/public/browser/notification_source.h" | 20 #include "content/public/browser/notification_source.h" |
| 21 #include "google_apis/gaia/gaia_constants.h" | 21 #include "google_apis/gaia/gaia_constants.h" |
| 22 #include "net/url_request/url_request_context_getter.h" | 22 #include "net/url_request/url_request_context_getter.h" |
| 23 | 23 |
| 24 namespace policy { | 24 namespace policy { |
| 25 | 25 |
| 26 UserPolicySigninService::UserPolicySigninService( | 26 UserPolicySigninService::UserPolicySigninService( |
| 27 Profile* profile, | 27 Profile* profile, |
| 28 PrefService* local_state, | 28 PrefService* local_state, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 | 186 |
| 187 void UserPolicySigninService::ProhibitSignoutIfNeeded() { | 187 void UserPolicySigninService::ProhibitSignoutIfNeeded() { |
| 188 if (GetManager()->IsClientRegistered()) { | 188 if (GetManager()->IsClientRegistered()) { |
| 189 DVLOG(1) << "User is registered for policy - prohibiting signout"; | 189 DVLOG(1) << "User is registered for policy - prohibiting signout"; |
| 190 GetSigninManager()->ProhibitSignout(true); | 190 GetSigninManager()->ProhibitSignout(true); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace policy | 194 } // namespace policy |
| OLD | NEW |