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

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

Issue 1149873003: easy-unlock: Fix AttemptAuth email CHECK crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run callback with failure Created 5 years, 7 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
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service_regular.cc
diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc
index 38cb60969bf3038093d09ae1677e2e14590fbe61..b02d769c63fb10c99a77e4721da353a8eb14942d 100644
--- a/chrome/browser/signin/easy_unlock_service_regular.cc
+++ b/chrome/browser/signin/easy_unlock_service_regular.cc
@@ -31,6 +31,7 @@
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/event_router.h"
#include "extensions/common/constants.h"
+#include "google_apis/gaia/gaia_auth_util.h"
#if defined(OS_CHROMEOS)
#include "apps/app_lifetime_monitor_factory.h"
@@ -98,7 +99,8 @@ std::string EasyUnlockServiceRegular::GetUserEmail() const {
// |profile| has to be a signed-in profile with SigninManager already
// created. Otherwise, just crash to collect stack.
DCHECK(signin_manager);
- return signin_manager->GetAuthenticatedUsername();
+ const std::string user_email = signin_manager->GetAuthenticatedUsername();
+ return user_email.empty() ? user_email : gaia::CanonicalizeEmail(user_email);
}
void EasyUnlockServiceRegular::LaunchSetup() {
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698