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

Unified Diff: chrome/browser/chromeos/settings/cros_settings.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: chrome/browser/chromeos/settings/cros_settings.cc
diff --git a/chrome/browser/chromeos/settings/cros_settings.cc b/chrome/browser/chromeos/settings/cros_settings.cc
index 016b33a5ce0be0e84813a2d53273e96651a3d929..a8e00518d654d385e970a0691e21e4727bb14260 100644
--- a/chrome/browser/chromeos/settings/cros_settings.cc
+++ b/chrome/browser/chromeos/settings/cros_settings.cc
@@ -47,7 +47,7 @@ CrosSettings* CrosSettings::Get() {
}
// static
-bool CrosSettings::IsWhitelisted(const std::string& username,
+bool CrosSettings::IsWhitelisted(const user_manager::UserID& user_id,
bool* wildcard_match) {
// Skip whitelist check for tests.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -60,7 +60,7 @@ bool CrosSettings::IsWhitelisted(const std::string& username,
cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
if (allow_new_user)
return true;
- return cros_settings->FindEmailInList(kAccountsPrefUsers, username,
+ return cros_settings->FindEmailInList(kAccountsPrefUsers, user_id.GetUserEmail(),
wildcard_match);
}

Powered by Google App Engine
This is Rietveld 408576698