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

Unified Diff: chrome/browser/sync/engine/auth_watcher.cc

Issue 276071: Don't overwrite email with lowercase value from GetUserInfo().... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/auth_watcher.cc
===================================================================
--- chrome/browser/sync/engine/auth_watcher.cc (revision 29327)
+++ chrome/browser/sync/engine/auth_watcher.cc (working copy)
@@ -108,14 +108,8 @@
Authenticator auth(scm_, user_settings_);
Authenticator::AuthenticationResult result =
auth.AuthenticateToken(auth_token);
- string email = gaia_email;
- if (auth.display_email() && *auth.display_email()) {
- email = auth.display_email();
- LOG(INFO) << "Auth returned email " << email << " for gaia email " <<
- gaia_email;
- }
AuthWatcherEvent event = {AuthWatcherEvent::ILLEGAL_VALUE , 0};
- gaia_->SetUsername(email);
+ gaia_->SetUsername(gaia_email);
gaia_->SetAuthToken(auth_token, SAVE_IN_MEMORY_ONLY);
const bool was_authenticated = NOT_AUTHENTICATED != status_;
switch (result) {
@@ -123,16 +117,17 @@
{
status_ = GAIA_AUTHENTICATED;
PathString share_name;
- CHECK(AppendUTF8ToPathString(email.data(), email.size(), &share_name));
- user_settings_->SwitchUser(email);
+ CHECK(AppendUTF8ToPathString(gaia_email.data(), gaia_email.size(),
+ &share_name));
+ user_settings_->SwitchUser(gaia_email);
// Set the authentication token for notifications
- talk_mediator_->SetAuthToken(email, auth_token);
+ talk_mediator_->SetAuthToken(gaia_email, auth_token);
scm_->set_auth_token(auth_token);
if (!was_authenticated)
LoadDirectoryListAndOpen(share_name);
- NotifyAuthSucceeded(email);
+ NotifyAuthSucceeded(gaia_email);
return;
}
case Authenticator::BAD_AUTH_TOKEN:
@@ -150,7 +145,7 @@
return;
}
// Always fall back to local authentication.
- if (was_authenticated || AuthenticateLocally(email)) {
+ if (was_authenticated || AuthenticateLocally(gaia_email)) {
if (AuthWatcherEvent::SERVICE_CONNECTION_FAILED == event.what_happened)
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698