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

Side by Side Diff: chrome/browser/chromeos/login/parallel_authenticator.cc

Issue 165173002: Style fixes for demo mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/parallel_authenticator.h" 5 #include "chrome/browser/chromeos/login/parallel_authenticator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 remove_user_data_on_failure_ = false; 339 remove_user_data_on_failure_ = false;
340 ephemeral_mount_attempted_ = true; 340 ephemeral_mount_attempted_ = true;
341 SystemSaltGetter::Get()->GetSystemSalt( 341 SystemSaltGetter::Get()->GetSystemSalt(
342 base::Bind(&Mount, 342 base::Bind(&Mount,
343 current_state_.get(), 343 current_state_.get(),
344 scoped_refptr<ParallelAuthenticator>(this), 344 scoped_refptr<ParallelAuthenticator>(this),
345 cryptohome::CREATE_IF_MISSING | cryptohome::ENSURE_EPHEMERAL)); 345 cryptohome::CREATE_IF_MISSING | cryptohome::ENSURE_EPHEMERAL));
346 } 346 }
347 347
348 void ParallelAuthenticator::LoginAsKioskAccount( 348 void ParallelAuthenticator::LoginAsKioskAccount(
349 const std::string& app_user_id, bool force_ephemeral) { 349 const std::string& app_user_id,
350 bool force_ephemeral) {
350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 351 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
351 current_state_.reset(new AuthAttemptState( 352 current_state_.reset(new AuthAttemptState(
352 UserContext(app_user_id, 353 UserContext(app_user_id,
353 std::string(), // password 354 std::string(), // password
354 std::string()), // auth_code 355 std::string()), // auth_code
355 std::string(), // login_token 356 std::string(), // login_token
356 std::string(), // login_captcha 357 std::string(), // login_captcha
357 User::USER_TYPE_KIOSK_APP, 358 User::USER_TYPE_KIOSK_APP,
358 false)); 359 false));
359 remove_user_data_on_failure_ = true; 360 remove_user_data_on_failure_ = true;
360 int ephemeral_flag = force_ephemeral ? cryptohome::ENSURE_EPHEMERAL : 0; 361 const int ephemeral_flag =
362 force_ephemeral ? cryptohome::ENSURE_EPHEMERAL : 0;
361 MountPublic(current_state_.get(), 363 MountPublic(current_state_.get(),
362 scoped_refptr<ParallelAuthenticator>(this), 364 scoped_refptr<ParallelAuthenticator>(this),
363 cryptohome::CREATE_IF_MISSING | ephemeral_flag); 365 cryptohome::CREATE_IF_MISSING | ephemeral_flag);
364 } 366 }
365 367
366 void ParallelAuthenticator::OnRetailModeLoginSuccess() { 368 void ParallelAuthenticator::OnRetailModeLoginSuccess() {
367 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 369 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
368 VLOG(1) << "Retail mode login success"; 370 VLOG(1) << "Retail mode login success";
369 // Send notification of success 371 // Send notification of success
370 AuthenticationNotificationDetails details(true); 372 AuthenticationNotificationDetails details(true);
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 Resolve(); 809 Resolve();
808 } 810 }
809 811
810 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, 812 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished,
811 bool check_result) { 813 bool check_result) {
812 owner_is_verified_ = owner_check_finished; 814 owner_is_verified_ = owner_check_finished;
813 user_can_login_ = check_result; 815 user_can_login_ = check_result;
814 } 816 }
815 817
816 } // namespace chromeos 818 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698