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

Unified Diff: chrome/browser/chromeos/login/login_performer.cc

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the nits and rebased on ToT (which now has PART1 in). Created 9 years, 1 month 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/login/login_performer.cc
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index 3d2b715188adc9567cb54329e51ae545f3a5c632..910cdb2f5af62891fc1db7ac24a94cb7fe535540 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -276,10 +276,7 @@ void LoginPerformer::CompleteLogin(const std::string& username,
StartLoginCompletion();
} else {
// Otherwise, do whitelist check first.
- const base::ListValue *user_list;
- base::StringValue username_value(username);
- if (cros_settings->GetList(kAccountsPrefUsers, &user_list) &&
- user_list->Find(username_value) != user_list->end()) {
+ if (cros_settings->FindEmailInList(kAccountsPrefUsers, username)) {
StartLoginCompletion();
} else {
if (delegate_)
@@ -321,10 +318,7 @@ void LoginPerformer::Login(const std::string& username,
// Starts authentication if guest login is allowed or online auth pending.
StartAuthentication();
} else {
- const base::ListValue *user_list;
- base::StringValue username_value(username);
- if (cros_settings->GetList(kAccountsPrefUsers, &user_list) &&
- user_list->Find(username_value) != user_list->end()) {
+ if (cros_settings->FindEmailInList(kAccountsPrefUsers, username)) {
StartAuthentication();
} else {
if (delegate_)
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/chromeos/login/mock_signed_settings_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698