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 31302c7ef6f22ac6a885f64bcb60646b26076441..b7b215cd8f1e7155836d3a6ccaa7e53deab0cf72 100644 |
--- a/chrome/common/net/gaia/gaia_auth_consumer.h |
+++ b/chrome/common/net/gaia/gaia_auth_consumer.h |
@@ -36,15 +36,15 @@ class GaiaAuthConsumer { |
std::string data; // Full contents of ClientLogin return. |
}; |
- enum ClientLoginErrorCode { |
+ enum GaiaAuthErrorCode { |
NETWORK_ERROR, |
REQUEST_CANCELED, |
TWO_FACTOR, // Callers can treat this as a success. |
PERMISSION_DENIED |
}; |
- struct ClientLoginError { |
- inline bool operator==(const ClientLoginError &b) const { |
+ struct GaiaAuthError { |
+ inline bool operator==(const GaiaAuthError &b) const { |
if (code != b.code) { |
return false; |
} |
@@ -54,14 +54,20 @@ class GaiaAuthConsumer { |
return true; |
} |
- ClientLoginErrorCode code; |
+ GaiaAuthErrorCode code; |
int network_error; // This field is only valid if NETWORK_ERROR occured. |
std::string data; // TODO(chron): Remove this field. Should preparse data. |
}; |
virtual ~GaiaAuthConsumer() {} |
- virtual void OnClientLoginFailure(const ClientLoginError& error) = 0; |
- virtual void OnClientLoginSuccess(const ClientLoginResult& result) = 0; |
+ |
+ virtual void OnClientLoginSuccess(const ClientLoginResult& result) {} |
+ virtual void OnClientLoginFailure(const GaiaAuthError& error) {} |
+ |
+ virtual void OnIssueAuthTokenSuccess(const std::string& service, |
+ const std::string& auth_token) {} |
+ virtual void OnIssueAuthTokenFailure(const std::string& service, |
+ const GaiaAuthError& error) {} |
}; |
#endif // CHROME_COMMON_NET_GAIA_GAIA_AUTH_CONSUMER_H_ |