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

Unified Diff: chrome/browser/signin/oauth2_token_service.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/browser/signin/oauth2_token_service.cc
diff --git a/chrome/browser/signin/oauth2_token_service.cc b/chrome/browser/signin/oauth2_token_service.cc
index abddb4e8d46ba4b2febc36111848eddc313f8858..32e73780e1073a83a507e200fd1a5547d73a8847 100644
--- a/chrome/browser/signin/oauth2_token_service.cc
+++ b/chrome/browser/signin/oauth2_token_service.cc
@@ -213,7 +213,7 @@ void OAuth2TokenService::Fetcher::OnGetTokenSuccess(
// be added when it calls back the waiting requests.
oauth2_token_service_->OnFetchComplete(this);
InformWaitingRequests();
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void OAuth2TokenService::Fetcher::OnGetTokenFailure(
@@ -238,7 +238,7 @@ void OAuth2TokenService::Fetcher::OnGetTokenFailure(
// added when it calls back the waiting requests.
oauth2_token_service_->OnFetchComplete(this);
InformWaitingRequests();
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
// static
@@ -324,13 +324,14 @@ scoped_ptr<OAuth2TokenService::Request> OAuth2TokenService::StartRequest(
std::string refresh_token = GetRefreshToken();
if (refresh_token.empty()) {
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &OAuth2TokenService::InformConsumer,
- request->AsWeakPtr(),
- GoogleServiceAuthError(
- GoogleServiceAuthError::USER_NOT_SIGNED_UP),
- std::string(),
- base::Time()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &OAuth2TokenService::InformConsumer,
+ request->AsWeakPtr(),
+ GoogleServiceAuthError(GoogleServiceAuthError::USER_NOT_SIGNED_UP),
+ std::string(),
+ base::Time()));
return request.PassAs<Request>();
}
@@ -360,12 +361,13 @@ scoped_ptr<OAuth2TokenService::Request>
CHECK(HasCacheEntry(scopes));
const CacheEntry* cache_entry = GetCacheEntry(scopes);
scoped_ptr<RequestImpl> request(new RequestImpl(consumer));
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &OAuth2TokenService::InformConsumer,
- request->AsWeakPtr(),
- GoogleServiceAuthError(GoogleServiceAuthError::NONE),
- cache_entry->access_token,
- cache_entry->expiration_date));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&OAuth2TokenService::InformConsumer,
+ request->AsWeakPtr(),
+ GoogleServiceAuthError(GoogleServiceAuthError::NONE),
+ cache_entry->access_token,
+ cache_entry->expiration_date));
return request.PassAs<Request>();
}

Powered by Google App Engine
This is Rietveld 408576698