| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // UserInfoFetcher::Delegate implementation: | 81 // UserInfoFetcher::Delegate implementation: |
| 82 virtual void OnGetUserInfoSuccess(const DictionaryValue* response) OVERRIDE; | 82 virtual void OnGetUserInfoSuccess(const DictionaryValue* response) OVERRIDE; |
| 83 virtual void OnGetUserInfoFailure( | 83 virtual void OnGetUserInfoFailure( |
| 84 const GoogleServiceAuthError& error) OVERRIDE; | 84 const GoogleServiceAuthError& error) OVERRIDE; |
| 85 | 85 |
| 86 // CloudPolicyClient::Observer implementation. | 86 // CloudPolicyClient::Observer implementation. |
| 87 virtual void OnPolicyFetched(policy::CloudPolicyClient* client) OVERRIDE {} | 87 virtual void OnPolicyFetched(policy::CloudPolicyClient* client) OVERRIDE {} |
| 88 virtual void OnRegistrationStateChanged( | 88 virtual void OnRegistrationStateChanged( |
| 89 policy::CloudPolicyClient* client) OVERRIDE; | 89 policy::CloudPolicyClient* client) OVERRIDE; |
| 90 virtual void OnRobotAuthCodesFetched(CloudPolicyClient* client) OVERRIDE {} |
| 90 virtual void OnClientError(policy::CloudPolicyClient* client) OVERRIDE; | 91 virtual void OnClientError(policy::CloudPolicyClient* client) OVERRIDE; |
| 91 | 92 |
| 92 private: | 93 private: |
| 93 // Invoked when the registration request has been completed. | 94 // Invoked when the registration request has been completed. |
| 94 void RequestCompleted(); | 95 void RequestCompleted(); |
| 95 | 96 |
| 96 // Fetcher used while obtaining an OAuth token for client registration. | 97 // Fetcher used while obtaining an OAuth token for client registration. |
| 97 scoped_ptr<OAuth2AccessTokenFetcher> oauth2_access_token_fetcher_; | 98 scoped_ptr<OAuth2AccessTokenFetcher> oauth2_access_token_fetcher_; |
| 98 | 99 |
| 99 // Helper class for fetching information from GAIA about the currently | 100 // Helper class for fetching information from GAIA about the currently |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 // before UserCloudPolicyManager shuts down the CloudPolicyClient. | 553 // before UserCloudPolicyManager shuts down the CloudPolicyClient. |
| 553 registration_helper_.reset(); | 554 registration_helper_.reset(); |
| 554 StopObserving(); | 555 StopObserving(); |
| 555 } | 556 } |
| 556 | 557 |
| 557 UserCloudPolicyManager* UserPolicySigninService::GetManager() { | 558 UserCloudPolicyManager* UserPolicySigninService::GetManager() { |
| 558 return UserCloudPolicyManagerFactory::GetForProfile(profile_); | 559 return UserCloudPolicyManagerFactory::GetForProfile(profile_); |
| 559 } | 560 } |
| 560 | 561 |
| 561 } // namespace policy | 562 } // namespace policy |
| OLD | NEW |