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

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

Issue 1149873003: easy-unlock: Fix AttemptAuth email CHECK crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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 | « no previous file | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service.cc
diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc
index 5170566ad18c2ff6abb703b2a691a760a590085c..898e221f4affadcb878635a9c45868382fe65043 100644
--- a/chrome/browser/signin/easy_unlock_service.cc
+++ b/chrome/browser/signin/easy_unlock_service.cc
@@ -493,7 +493,13 @@ void EasyUnlockService::AttemptAuth(const std::string& user_id) {
void EasyUnlockService::AttemptAuth(const std::string& user_id,
const AttemptAuthCallback& callback) {
- CHECK_EQ(GetUserEmail(), user_id);
+ const std::string user_email = GetUserEmail();
+ if (user_email.empty()) {
+ LOG(ERROR) << "Empty user email. Refresh token might go bad.";
+ return;
Tim Song 2015/05/21 00:06:46 We should run the callback with a failure.
xiyuan 2015/05/21 01:32:12 Good call. Done.
+ }
+
+ CHECK_EQ(user_email, user_id);
auth_attempt_.reset(new EasyUnlockAuthAttempt(
app_manager_.get(), user_id,
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698