| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 private: | 67 private: |
| 68 void RegisterForPolicyInternal( | 68 void RegisterForPolicyInternal( |
| 69 const std::string& username, | 69 const std::string& username, |
| 70 const std::string& access_token, | 70 const std::string& access_token, |
| 71 const PolicyRegistrationCallback& callback); | 71 const PolicyRegistrationCallback& callback); |
| 72 | 72 |
| 73 void CallPolicyRegistrationCallback(scoped_ptr<CloudPolicyClient> client, | 73 void CallPolicyRegistrationCallback(scoped_ptr<CloudPolicyClient> client, |
| 74 PolicyRegistrationCallback callback); | 74 PolicyRegistrationCallback callback); |
| 75 | 75 |
| 76 // KeyedService implementation: | 76 // KeyedService implementation: |
| 77 virtual void Shutdown() OVERRIDE; | 77 virtual void Shutdown() override; |
| 78 | 78 |
| 79 // CloudPolicyService::Observer implementation: | 79 // CloudPolicyService::Observer implementation: |
| 80 virtual void OnInitializationCompleted(CloudPolicyService* service) OVERRIDE; | 80 virtual void OnInitializationCompleted(CloudPolicyService* service) override; |
| 81 | 81 |
| 82 // Overridden from UserPolicySigninServiceBase to cancel the pending delayed | 82 // Overridden from UserPolicySigninServiceBase to cancel the pending delayed |
| 83 // registration. | 83 // registration. |
| 84 virtual void ShutdownUserCloudPolicyManager() OVERRIDE; | 84 virtual void ShutdownUserCloudPolicyManager() override; |
| 85 | 85 |
| 86 // Registers for cloud policy for an already signed-in user. | 86 // Registers for cloud policy for an already signed-in user. |
| 87 void RegisterCloudPolicyService(); | 87 void RegisterCloudPolicyService(); |
| 88 | 88 |
| 89 // Cancels a pending cloud policy registration attempt. | 89 // Cancels a pending cloud policy registration attempt. |
| 90 void CancelPendingRegistration(); | 90 void CancelPendingRegistration(); |
| 91 | 91 |
| 92 void OnRegistrationDone(); | 92 void OnRegistrationDone(); |
| 93 | 93 |
| 94 scoped_ptr<CloudPolicyClientRegistrationHelper> registration_helper_; | 94 scoped_ptr<CloudPolicyClientRegistrationHelper> registration_helper_; |
| 95 | 95 |
| 96 // Weak pointer to the token service used to authenticate the | 96 // Weak pointer to the token service used to authenticate the |
| 97 // CloudPolicyClient during registration. | 97 // CloudPolicyClient during registration. |
| 98 ProfileOAuth2TokenService* oauth2_token_service_; | 98 ProfileOAuth2TokenService* oauth2_token_service_; |
| 99 | 99 |
| 100 // The PrefService associated with the profile. | 100 // The PrefService associated with the profile. |
| 101 PrefService* profile_prefs_; | 101 PrefService* profile_prefs_; |
| 102 | 102 |
| 103 base::WeakPtrFactory<UserPolicySigninService> weak_factory_; | 103 base::WeakPtrFactory<UserPolicySigninService> weak_factory_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninService); | 105 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninService); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace policy | 108 } // namespace policy |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ | 110 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_MOBILE_H_ |
| OLD | NEW |