Chromium Code Reviews| Index: chrome/browser/chromeos/login/oauth1_login_verifier.h |
| diff --git a/chrome/browser/chromeos/login/oauth_login_verifier.h b/chrome/browser/chromeos/login/oauth1_login_verifier.h |
| similarity index 65% |
| rename from chrome/browser/chromeos/login/oauth_login_verifier.h |
| rename to chrome/browser/chromeos/login/oauth1_login_verifier.h |
| index 6ee0864a613ba4d04d2939c5c5d8e8ce20288cc0..6a3b5958cf2f430eab36959cdb8b64d6e8de6ae1 100644 |
| --- a/chrome/browser/chromeos/login/oauth_login_verifier.h |
| +++ b/chrome/browser/chromeos/login/oauth1_login_verifier.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_VERIFIER_H_ |
| -#define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_VERIFIER_H_ |
| +#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH1_LOGIN_VERIFIER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH1_LOGIN_VERIFIER_H_ |
| #include <string> |
| @@ -21,28 +21,29 @@ namespace chromeos { |
| // Verifies OAuth1 access token by performing OAuthLogin. Fetches user cookies |
| // on successful OAuth authentication. |
| -class OAuthLoginVerifier : public base::SupportsWeakPtr<OAuthLoginVerifier>, |
| - public GaiaOAuthConsumer, |
| - public GaiaAuthConsumer { |
| +class OAuth1LoginVerifier : public base::SupportsWeakPtr<OAuth1LoginVerifier>, |
| + public GaiaOAuthConsumer, |
| + public GaiaAuthConsumer { |
| public: |
| class Delegate { |
| public: |
| virtual ~Delegate() {} |
| - virtual void OnOAuthVerificationSucceeded(const std::string& user_name, |
| - const std::string& sid, |
| - const std::string& lsid, |
| - const std::string& auth) {} |
| - virtual void OnOAuthVerificationFailed(const std::string& user_name) {} |
| - virtual void OnUserCookiesFetchSucceeded(const std::string& user_name) {} |
| - virtual void OnUserCookiesFetchFailed(const std::string& user_name) {} |
| + virtual void OnOAuth1VerificationSucceeded(const std::string& user_name, |
| + const std::string& sid, |
| + const std::string& lsid, |
| + const std::string& auth) {} |
| + virtual void OnOAuth1VerificationFailed(const std::string& user_name) {} |
| + virtual void OnCookiesFetchWithOAuth1Succeeded( |
| + const std::string& user_name) {} |
| + virtual void OnCookiesFetchWithOAuth1Failed(const std::string& user_name) {} |
| }; |
| - OAuthLoginVerifier(OAuthLoginVerifier::Delegate* delegate, |
| - Profile* user_profile, |
| - const std::string& oauth1_token, |
| - const std::string& oauth1_secret, |
| - const std::string& username); |
| - virtual ~OAuthLoginVerifier(); |
| + OAuth1LoginVerifier(OAuth1LoginVerifier::Delegate* delegate, |
| + net::URLRequestContextGetter* user_request_context, |
|
Joao da Silva
2013/01/11 16:45:07
Needs a forward decl
zel
2013/01/11 19:51:16
Done.
|
| + const std::string& oauth1_token, |
| + const std::string& oauth1_secret, |
| + const std::string& username); |
| + virtual ~OAuth1LoginVerifier(); |
| bool is_done() { |
| return step_ == VERIFICATION_STEP_FAILED || |
| @@ -86,7 +87,7 @@ class OAuthLoginVerifier : public base::SupportsWeakPtr<OAuthLoginVerifier>, |
| virtual void OnMergeSessionFailure( |
| const GoogleServiceAuthError& error) OVERRIDE; |
| - OAuthLoginVerifier::Delegate* delegate_; |
| + OAuth1LoginVerifier::Delegate* delegate_; |
| GaiaOAuthFetcher oauth_fetcher_; |
| GaiaAuthFetcher gaia_fetcher_; |
| std::string oauth1_token_; |
| @@ -94,13 +95,12 @@ class OAuthLoginVerifier : public base::SupportsWeakPtr<OAuthLoginVerifier>, |
| std::string sid_; |
| std::string lsid_; |
| std::string username_; |
| - Profile* user_profile_; |
| int verification_count_; |
| VerificationStep step_; |
| - DISALLOW_COPY_AND_ASSIGN(OAuthLoginVerifier); |
| + DISALLOW_COPY_AND_ASSIGN(OAuth1LoginVerifier); |
| }; |
| } // namespace chromeos |
| -#endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_VERIFIER_H_ |
| +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH1_LOGIN_VERIFIER_H_ |