Index: chrome/browser/chromeos/gdata/gdata_auth_service.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_auth_service.h b/chrome/browser/chromeos/gdata/gdata_auth_service.h |
index d058530a179b55859b3504e2a54a116e61da169e..91b72a7be0134e33a35f4cf3d2951dcf7ca28bb4 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_auth_service.h |
+++ b/chrome/browser/chromeos/gdata/gdata_auth_service.h |
@@ -54,36 +54,35 @@ class GDataAuthService : public content::NotificationObserver { |
void StartAuthentication(GDataOperationRegistry* registry, |
const AuthStatusCallback& callback); |
- // True if OAuth2 auth token is retrieved and believed to be fresh. |
- bool IsFullyAuthenticated() const { return !auth_token_.empty(); } |
+ // True if OAuth2 access token is retrieved and believed to be fresh. |
Daniel Erat
2012/07/25 22:07:31
nit: s/if /if an/
satorux1
2012/07/25 22:21:21
Done.
|
+ // The access token is used to access the gdata server. |
+ bool HasAccessToken() const { return !access_token_.empty(); } |
// True if OAuth2 refresh token is present. It's absence means that user |
Daniel Erat
2012/07/25 22:07:31
nit: s/if /if an/, s/It's/its/
satorux1
2012/07/25 22:21:21
Done.
satorux1
2012/07/25 22:21:21
Done.
|
// is not properly authenticated. |
- bool IsPartiallyAuthenticated() const { return !refresh_token_.empty(); } |
+ // The refresh token is used to get the access token. |
+ bool HasRefreshToken() const { return !refresh_token_.empty(); } |
- // Gets OAuth2 auth token. |
- const std::string& oauth2_auth_token() const { return auth_token_; } |
+ // Returns OAuth2 access token. |
+ const std::string& access_token() const { return access_token_; } |
- // Clears OAuth2 token. |
- void ClearOAuth2Token() { auth_token_.clear(); } |
- |
- // Gets OAuth2 refresh token. |
- const std::string& GetOAuth2RefreshToken() { return refresh_token_; } |
+ // Clears OAuth2 access token. |
+ void ClearAccessToken() { access_token_.clear(); } |
// Callback for AuthOperation (InternalAuthStatusCallback). |
void OnAuthCompleted(scoped_refptr<base::MessageLoopProxy> relay_proxy, |
const AuthStatusCallback& callback, |
GDataErrorCode error, |
- const std::string& auth_token); |
+ const std::string& access_token); |
// Overridden from content::NotificationObserver: |
virtual void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
- // Sets the auth_token as specified. This should be used only for testing. |
- void set_oauth2_auth_token_for_testing(const std::string& token) { |
- auth_token_ = token; |
+ // Sets the access_token as specified. This should be used only for testing. |
+ void set_access_token_for_testing(const std::string& token) { |
+ access_token_ = token; |
} |
private: |
@@ -95,7 +94,7 @@ class GDataAuthService : public content::NotificationObserver { |
Profile* profile_; |
std::string refresh_token_; |
- std::string auth_token_; |
+ std::string access_token_; |
ObserverList<Observer> observers_; |
content::NotificationRegistrar registrar_; |