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

Unified Diff: chrome/browser/ui/app_list/search/people/people_provider.cc

Issue 617183003: Make sure GetAuthenticatedAccountId() returns a canonicalized id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 6 years, 2 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/ui/app_list/search/people/people_provider.cc
diff --git a/chrome/browser/ui/app_list/search/people/people_provider.cc b/chrome/browser/ui/app_list/search/people/people_provider.cc
index 97419aec50ea81891503fc6905702adf0867425e..66b3c69ba5a2a025bdf6038a86f343c954853036 100644
--- a/chrome/browser/ui/app_list/search/people/people_provider.cc
+++ b/chrome/browser/ui/app_list/search/people/people_provider.cc
@@ -118,12 +118,14 @@ void PeopleProvider::RequestAccessToken() {
if (access_token_request_ != NULL)
return;
- ProfileOAuth2TokenService* token_service =
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
SigninManagerBase* signin_manager =
SigninManagerFactory::GetInstance()->GetForProfile(profile_);
- access_token_request_ = token_service->StartRequest(
- signin_manager->GetAuthenticatedAccountId(), oauth2_scope_, this);
+ if (signin_manager->IsAuthenticated()) {
+ ProfileOAuth2TokenService* token_service =
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
+ access_token_request_ = token_service->StartRequest(
+ signin_manager->GetAuthenticatedAccountId(), oauth2_scope_, this);
+ }
}
GURL PeopleProvider::GetQueryUrl(const std::string& query) {

Powered by Google App Engine
This is Rietveld 408576698