summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authoridana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 00:42:42 +0000
committeridana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 00:42:42 +0000
commit69c053b468afcdc6338478a7f2cd92d4092c6c11 (patch)
treeaa5aee64c6f0fb3c962120c7d9280fb38a6fc58e /chrome/browser/sync
parent963506f19368e20a8aa1d0753c128dddc9875eb1 (diff)
downloadchromium_src-69c053b468afcdc6338478a7f2cd92d4092c6c11.zip
chromium_src-69c053b468afcdc6338478a7f2cd92d4092c6c11.tar.gz
chromium_src-69c053b468afcdc6338478a7f2cd92d4092c6c11.tar.bz2
This change is patched from http://codereview.chromium.org/276071 by randy.posynick@gmail.com
Don't overwrite email with lowercase value from GetUserInfo(). BUG=20848 TEST=See bug for description TBR=brg@chromium.org Review URL: http://codereview.chromium.org/392016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/engine/auth_watcher.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/chrome/browser/sync/engine/auth_watcher.cc b/chrome/browser/sync/engine/auth_watcher.cc
index 1f78d15..b087671 100644
--- a/chrome/browser/sync/engine/auth_watcher.cc
+++ b/chrome/browser/sync/engine/auth_watcher.cc
@@ -107,30 +107,24 @@ void AuthWatcher::DoAuthenticateWithToken(const std::string& gaia_email,
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) {
case Authenticator::SUCCESS:
{
status_ = GAIA_AUTHENTICATED;
- const PathString& share_name = email;
- user_settings_->SwitchUser(email);
+ const PathString& share_name = gaia_email;
+ 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:
@@ -148,7 +142,7 @@ void AuthWatcher::DoAuthenticateWithToken(const std::string& gaia_email,
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;
}