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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/login/login_performer.h" 5 #include "chrome/browser/chromeos/login/login_performer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 } 270 }
271 271
272 bool allow_new_user = false; 272 bool allow_new_user = false;
273 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 273 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
274 if (ScreenLocker::default_screen_locker() || allow_new_user) { 274 if (ScreenLocker::default_screen_locker() || allow_new_user) {
275 // Starts authentication if guest login is allowed or online auth pending. 275 // Starts authentication if guest login is allowed or online auth pending.
276 StartLoginCompletion(); 276 StartLoginCompletion();
277 } else { 277 } else {
278 // Otherwise, do whitelist check first. 278 // Otherwise, do whitelist check first.
279 const base::ListValue *user_list; 279 if (cros_settings->FindEmailInList(kAccountsPrefUsers, username)) {
280 base::StringValue username_value(username);
281 if (cros_settings->GetList(kAccountsPrefUsers, &user_list) &&
282 user_list->Find(username_value) != user_list->end()) {
283 StartLoginCompletion(); 280 StartLoginCompletion();
284 } else { 281 } else {
285 if (delegate_) 282 if (delegate_)
286 delegate_->WhiteListCheckFailed(username); 283 delegate_->WhiteListCheckFailed(username);
287 else 284 else
288 NOTREACHED(); 285 NOTREACHED();
289 } 286 }
290 } 287 }
291 } 288 }
292 289
(...skipping 21 matching lines...) Expand all
314 return; 311 return;
315 } 312 }
316 } 313 }
317 314
318 bool allow_new_user = false; 315 bool allow_new_user = false;
319 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 316 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
320 if (ScreenLocker::default_screen_locker() || allow_new_user) { 317 if (ScreenLocker::default_screen_locker() || allow_new_user) {
321 // Starts authentication if guest login is allowed or online auth pending. 318 // Starts authentication if guest login is allowed or online auth pending.
322 StartAuthentication(); 319 StartAuthentication();
323 } else { 320 } else {
324 const base::ListValue *user_list; 321 if (cros_settings->FindEmailInList(kAccountsPrefUsers, username)) {
325 base::StringValue username_value(username);
326 if (cros_settings->GetList(kAccountsPrefUsers, &user_list) &&
327 user_list->Find(username_value) != user_list->end()) {
328 StartAuthentication(); 322 StartAuthentication();
329 } else { 323 } else {
330 if (delegate_) 324 if (delegate_)
331 delegate_->WhiteListCheckFailed(username); 325 delegate_->WhiteListCheckFailed(username);
332 else 326 else
333 NOTREACHED(); 327 NOTREACHED();
334 } 328 }
335 } 329 }
336 } 330 }
337 331
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 profile, 545 profile,
552 username_, 546 username_,
553 password_, 547 password_,
554 captcha_token_, 548 captcha_token_,
555 captcha_)); 549 captcha_));
556 } 550 }
557 password_.clear(); 551 password_.clear();
558 } 552 }
559 553
560 } // namespace chromeos 554 } // namespace chromeos
OLDNEW
« 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