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

Side by Side Diff: components/user_manager/user_manager_base.cc

Issue 1394723002: This CL fixes the issue with login using alternative e-mails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/user_manager/user_manager_base.h" 5 #include "components/user_manager/user_manager_base.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 // Local State may not be initialized in tests. 1138 // Local State may not be initialized in tests.
1139 if (!local_state) 1139 if (!local_state)
1140 return; 1140 return;
1141 1141
1142 ListPrefUpdate update(local_state, kKnownUsers); 1142 ListPrefUpdate update(local_state, kKnownUsers);
1143 base::DictionaryValue dict; 1143 base::DictionaryValue dict;
1144 dict.SetInteger(path, in_value); 1144 dict.SetInteger(path, in_value);
1145 UpdateKnownUserPrefs(user_id, dict, false); 1145 UpdateKnownUserPrefs(user_id, dict, false);
1146 } 1146 }
1147 1147
1148 bool UserManagerBase::GetKnownUserCanonicalEmail(const UserID& user_id,
1149 std::string* out_email) {
1150 return GetKnownUserStringPref(user_id, kCanonicalEmail, out_email);
1151 }
1152
1148 void UserManagerBase::UpdateGaiaID(const UserID& user_id, 1153 void UserManagerBase::UpdateGaiaID(const UserID& user_id,
1149 const std::string& gaia_id) { 1154 const std::string& gaia_id) {
1150 SetKnownUserStringPref(user_id, kGAIAIdKey, gaia_id); 1155 SetKnownUserStringPref(user_id, kGAIAIdKey, gaia_id);
1151 } 1156 }
1152 1157
1153 bool UserManagerBase::FindGaiaID(const UserID& user_id, 1158 bool UserManagerBase::FindGaiaID(const UserID& user_id,
1154 std::string* out_value) { 1159 std::string* out_value) {
1155 return GetKnownUserStringPref(user_id, kGAIAIdKey, out_value); 1160 return GetKnownUserStringPref(user_id, kGAIAIdKey, out_value);
1156 } 1161 }
1157 1162
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 } 1351 }
1347 1352
1348 void UserManagerBase::DeleteUser(User* user) { 1353 void UserManagerBase::DeleteUser(User* user) {
1349 const bool is_active_user = (user == active_user_); 1354 const bool is_active_user = (user == active_user_);
1350 delete user; 1355 delete user;
1351 if (is_active_user) 1356 if (is_active_user)
1352 active_user_ = NULL; 1357 active_user_ = NULL;
1353 } 1358 }
1354 1359
1355 } // namespace user_manager 1360 } // namespace user_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698