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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void OnAccessTokenAvailable(const std::string& access_token); | 83 void OnAccessTokenAvailable(const std::string& access_token); |
84 | 84 |
85 // Returns true if the underlying CloudPolicyClient is already registered. | 85 // Returns true if the underlying CloudPolicyClient is already registered. |
86 bool IsClientRegistered() const; | 86 bool IsClientRegistered() const; |
87 | 87 |
88 // Indicates a wildcard login check should be performed once an access token | 88 // Indicates a wildcard login check should be performed once an access token |
89 // is available. | 89 // is available. |
90 void EnableWildcardLoginCheck(const std::string& username); | 90 void EnableWildcardLoginCheck(const std::string& username); |
91 | 91 |
92 // ConfigurationPolicyProvider: | 92 // ConfigurationPolicyProvider: |
93 virtual void Shutdown() OVERRIDE; | 93 virtual void Shutdown() override; |
94 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; | 94 virtual bool IsInitializationComplete(PolicyDomain domain) const override; |
95 | 95 |
96 // CloudPolicyService::Observer: | 96 // CloudPolicyService::Observer: |
97 virtual void OnInitializationCompleted(CloudPolicyService* service) OVERRIDE; | 97 virtual void OnInitializationCompleted(CloudPolicyService* service) override; |
98 | 98 |
99 // CloudPolicyClient::Observer: | 99 // CloudPolicyClient::Observer: |
100 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; | 100 virtual void OnPolicyFetched(CloudPolicyClient* client) override; |
101 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; | 101 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) override; |
102 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; | 102 virtual void OnClientError(CloudPolicyClient* client) override; |
103 | 103 |
104 // ComponentCloudPolicyService::Delegate: | 104 // ComponentCloudPolicyService::Delegate: |
105 virtual void OnComponentCloudPolicyUpdated() OVERRIDE; | 105 virtual void OnComponentCloudPolicyUpdated() override; |
106 | 106 |
107 protected: | 107 protected: |
108 // CloudPolicyManager: | 108 // CloudPolicyManager: |
109 virtual void GetChromePolicy(PolicyMap* policy_map) OVERRIDE; | 109 virtual void GetChromePolicy(PolicyMap* policy_map) override; |
110 | 110 |
111 private: | 111 private: |
112 // Fetches a policy token using the authentication context of the signin | 112 // Fetches a policy token using the authentication context of the signin |
113 // Profile, and calls back to OnOAuth2PolicyTokenFetched when done. | 113 // Profile, and calls back to OnOAuth2PolicyTokenFetched when done. |
114 void FetchPolicyOAuthTokenUsingSigninProfile(); | 114 void FetchPolicyOAuthTokenUsingSigninProfile(); |
115 | 115 |
116 // Called once the policy access token is available, and starts the | 116 // Called once the policy access token is available, and starts the |
117 // registration with the policy server if the token was successfully fetched. | 117 // registration with the policy server if the token was successfully fetched. |
118 void OnOAuth2PolicyTokenFetched(const std::string& policy_token, | 118 void OnOAuth2PolicyTokenFetched(const std::string& policy_token, |
119 const GoogleServiceAuthError& error); | 119 const GoogleServiceAuthError& error); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 base::Time time_init_completed_; | 173 base::Time time_init_completed_; |
174 base::Time time_token_available_; | 174 base::Time time_token_available_; |
175 base::Time time_client_registered_; | 175 base::Time time_client_registered_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 177 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace policy | 180 } // namespace policy |
181 | 181 |
182 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 182 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
OLD | NEW |