Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1185)

Unified Diff: chrome/common/net/gaia/gaia_auth_consumer.h

Issue 6894027: Initial refactoring complete Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed some tests that were broken by previous refactoring Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {}
« no previous file with comments | « chrome/common/net/gaia/authentication_fetcher_oauth.cc ('k') | chrome/common/net/gaia/gaia_auth_consumer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698