Index: chrome/common/net/gaia/gaia_auth_consumer.h |
diff --git a/chrome/common/net/gaia/gaia_auth_consumer.h b/chrome/common/net/gaia/gaia_auth_consumer.h |
index 4d6c37de8770add56d312c342beda4f1e9fa70b3..3a009a588afa6191a1a4f8fa3b1973de2215bf67 100644 |
--- a/chrome/common/net/gaia/gaia_auth_consumer.h |
+++ b/chrome/common/net/gaia/gaia_auth_consumer.h |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -8,13 +8,19 @@ |
#include <string> |
+#include "chrome/common/net/gaia/authentication_consumer.h" |
+ |
class GoogleServiceAuthError; |
// An interface that defines the callbacks for objects that |
-// GaiaAuthFetcher can return data to. |
-class GaiaAuthConsumer { |
+// GaiaAuthFetcher can return data to. With the introduction of |
+// AuthenticationConsumer and AuthenticationConsumerOAuth, etc., this could |
+// reasonable be renamed AuthenticationConsumerClientLogin, however, a better |
+// path will be to work to remove it outright. |
+class GaiaAuthConsumer : public AuthenticationConsumer { |
public: |
- struct ClientLoginResult { |
+ struct ClientLoginResult |
+ : public AuthenticationConsumer::AuthenticationResult { |
ClientLoginResult(); |
ClientLoginResult(const std::string& new_sid, |
const std::string& new_lsid, |
@@ -24,6 +30,9 @@ class GaiaAuthConsumer { |
bool operator==(const ClientLoginResult &b) const; |
+ // From AuthenticationConsumer::AuthenticationResult |
+ virtual bool IsValid() const; |
+ |
std::string sid; |
std::string lsid; |
std::string token; |
@@ -34,6 +43,9 @@ class GaiaAuthConsumer { |
virtual ~GaiaAuthConsumer() {} |
+ virtual void OnAuthenticationSuccess(const AuthenticationResult& result); |
+ virtual void OnAuthenticationFailure(const GoogleServiceAuthError& error); |
+ |
virtual void OnClientLoginSuccess(const ClientLoginResult& result) {} |
virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) {} |
@@ -42,6 +54,11 @@ class GaiaAuthConsumer { |
virtual void OnIssueAuthTokenFailure(const std::string& service, |
const GoogleServiceAuthError& error) {} |
+ virtual void OnIssueTokenSuccess(const std::string& service, |
+ const std::string& auth_token) {} |
+ virtual void OnIssueTokenFailure(const std::string& service, |
+ const GoogleServiceAuthError& error) {} |
+ |
virtual void OnGetUserInfoSuccess(const std::string& key, |
const std::string& value) {} |
virtual void OnGetUserInfoKeyNotFound(const std::string& key) {} |