| 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_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const GURL& url, | 66 const GURL& url, |
| 67 const std::string& name, | 67 const std::string& name, |
| 68 const net::CookieStore::CookieChangedCallback& callback) override; | 68 const net::CookieStore::CookieChangedCallback& callback) override; |
| 69 void OnSignedIn(const std::string& account_id, | 69 void OnSignedIn(const std::string& account_id, |
| 70 const std::string& gaia_id, | 70 const std::string& gaia_id, |
| 71 const std::string& username, | 71 const std::string& username, |
| 72 const std::string& password) override; | 72 const std::string& password) override; |
| 73 void PostSignedIn(const std::string& account_id, | 73 void PostSignedIn(const std::string& account_id, |
| 74 const std::string& username, | 74 const std::string& username, |
| 75 const std::string& password) override; | 75 const std::string& password) override; |
| 76 void PreSignOut(const base::Callback<void()>& sign_out) override; | 76 void PreSignOut( |
| 77 const base::Callback<void()>& sign_out, |
| 78 signin_metrics::ProfileSignout signout_source_metric) override; |
| 77 | 79 |
| 78 // SigninErrorController::Observer implementation. | 80 // SigninErrorController::Observer implementation. |
| 79 void OnErrorChanged() override; | 81 void OnErrorChanged() override; |
| 80 | 82 |
| 81 // gaia::GaiaOAuthClient::Delegate implementation. | 83 // gaia::GaiaOAuthClient::Delegate implementation. |
| 82 void OnGetTokenInfoResponse( | 84 void OnGetTokenInfoResponse( |
| 83 std::unique_ptr<base::DictionaryValue> token_info) override; | 85 std::unique_ptr<base::DictionaryValue> token_info) override; |
| 84 void OnOAuthError() override; | 86 void OnOAuthError() override; |
| 85 void OnNetworkError(int response_code) override; | 87 void OnNetworkError(int response_code) override; |
| 86 | 88 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 98 #endif | 100 #endif |
| 99 | 101 |
| 100 void AfterCredentialsCopied() override; | 102 void AfterCredentialsCopied() override; |
| 101 | 103 |
| 102 protected: | 104 protected: |
| 103 virtual void ShowUserManager(const base::FilePath& profile_path); | 105 virtual void ShowUserManager(const base::FilePath& profile_path); |
| 104 virtual void LockForceSigninProfile(const base::FilePath& profile_path); | 106 virtual void LockForceSigninProfile(const base::FilePath& profile_path); |
| 105 | 107 |
| 106 private: | 108 private: |
| 107 void MaybeFetchSigninTokenHandle(); | 109 void MaybeFetchSigninTokenHandle(); |
| 108 void OnCloseBrowsersSuccess(const base::Callback<void()>& sign_out, | 110 void OnCloseBrowsersSuccess( |
| 109 const base::FilePath& profile_path); | 111 const base::Callback<void()>& sign_out, |
| 112 const signin_metrics::ProfileSignout signout_source_metric, |
| 113 const base::FilePath& profile_path); |
| 110 void OnCloseBrowsersAborted(const base::FilePath& profile_path); | 114 void OnCloseBrowsersAborted(const base::FilePath& profile_path); |
| 111 | 115 |
| 112 Profile* profile_; | 116 Profile* profile_; |
| 113 | 117 |
| 114 SigninErrorController* signin_error_controller_; | 118 SigninErrorController* signin_error_controller_; |
| 115 #if !defined(OS_CHROMEOS) | 119 #if !defined(OS_CHROMEOS) |
| 116 std::list<base::Closure> delayed_callbacks_; | 120 std::list<base::Closure> delayed_callbacks_; |
| 117 #endif | 121 #endif |
| 118 | 122 |
| 119 bool is_force_signin_enabled_; | 123 bool is_force_signin_enabled_; |
| 120 bool should_display_user_manager_ = true; | 124 bool should_display_user_manager_ = true; |
| 121 | 125 |
| 122 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client_; | 126 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client_; |
| 123 std::unique_ptr<OAuth2TokenService::Request> oauth_request_; | 127 std::unique_ptr<OAuth2TokenService::Request> oauth_request_; |
| 124 | 128 |
| 125 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); | 129 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); |
| 126 }; | 130 }; |
| 127 | 131 |
| 128 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 132 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| OLD | NEW |