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

Unified Diff: chrome/browser/chromeos/gdata/gdata_operation_runner.cc

Issue 10827018: gdata: Rename functions in GDataAuthService per OAuth2 terminology (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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/browser/chromeos/gdata/gdata_operation_runner.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc b/chrome/browser/chromeos/gdata/gdata_operation_runner.cc
index 73d755d690657037e5aa84425e03c6d571253598..0705c387e11cdd2c953e9b6c4f6db76437057fe0 100644
--- a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc
+++ b/chrome/browser/chromeos/gdata/gdata_operation_runner.cc
@@ -57,7 +57,7 @@ void GDataOperationRunner::StartOperationWithRetry(
void GDataOperationRunner::StartOperation(GDataOperationInterface* operation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!auth_service_->IsFullyAuthenticated()) {
+ if (!auth_service_->HasAccessToken()) {
// Fetch OAuth2 authentication token from the refresh token first.
auth_service_->StartAuthentication(
operation_registry_.get(),
@@ -67,7 +67,7 @@ void GDataOperationRunner::StartOperation(GDataOperationInterface* operation) {
return;
}
- operation->Start(auth_service_->oauth2_auth_token());
+ operation->Start(auth_service_->access_token());
}
void GDataOperationRunner::OnOperationAuthRefresh(
@@ -77,7 +77,7 @@ void GDataOperationRunner::OnOperationAuthRefresh(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (code == HTTP_SUCCESS) {
- DCHECK(auth_service_->IsPartiallyAuthenticated());
+ DCHECK(auth_service_->HasRefreshToken());
StartOperation(operation);
} else {
operation->OnAuthFailed(code);
@@ -87,7 +87,7 @@ void GDataOperationRunner::OnOperationAuthRefresh(
void GDataOperationRunner::RetryOperation(GDataOperationInterface* operation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- auth_service_->ClearOAuth2Token();
+ auth_service_->ClearAccessToken();
// User authentication might have expired - rerun the request to force
// auth token refresh.
StartOperation(operation);

Powered by Google App Engine
This is Rietveld 408576698