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

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

Issue 23532034: Postpone loading about:flags ui until the certificates have been loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 // Now we can continue reading the private key. 451 // Now we can continue reading the private key.
452 DeviceSettingsService::Get()->SetUsername( 452 DeviceSettingsService::Get()->SetUsername(
453 current_state_->user_context.username); 453 current_state_->user_context.username);
454 DeviceSettingsService::Get()->GetOwnershipStatusAsync( 454 DeviceSettingsService::Get()->GetOwnershipStatusAsync(
455 base::Bind(&ParallelAuthenticator::OnOwnershipChecked, this)); 455 base::Bind(&ParallelAuthenticator::OnOwnershipChecked, this));
456 return false; 456 return false;
457 } 457 }
458 458
459 void ParallelAuthenticator::OnOwnershipChecked( 459 void ParallelAuthenticator::OnOwnershipChecked(
460 DeviceSettingsService::OwnershipStatus status, 460 DeviceSettingsService::OwnershipStatus status) {
461 bool is_owner) {
462 // Now we can check if this user is the owner. 461 // Now we can check if this user is the owner.
463 user_can_login_ = is_owner; 462 // TODO(tbarzic): This is broken. At this point, DeviceSettingsService will
pastarmovj 2013/09/05 12:48:18 This used to be the case before though - the owner
tbarzic 2013/09/05 17:59:17 yep. I know.. that reminds me, I forgot to put a b
463 // never have private key loaded.
464 user_can_login_ = DeviceSettingsService::Get()->HasPrivateOwnerKey();
464 owner_is_verified_ = true; 465 owner_is_verified_ = true;
465 Resolve(); 466 Resolve();
466 } 467 }
467 468
468 void ParallelAuthenticator::Resolve() { 469 void ParallelAuthenticator::Resolve() {
469 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 470 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
470 bool request_pending = false; 471 bool request_pending = false;
471 int mount_flags = cryptohome::MOUNT_FLAGS_NONE; 472 int mount_flags = cryptohome::MOUNT_FLAGS_NONE;
472 ParallelAuthenticator::AuthState state = ResolveState(); 473 ParallelAuthenticator::AuthState state = ResolveState();
473 VLOG(1) << "Resolved state to: " << state; 474 VLOG(1) << "Resolved state to: " << state;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 Resolve(); 742 Resolve();
742 } 743 }
743 744
744 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, 745 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished,
745 bool check_result) { 746 bool check_result) {
746 owner_is_verified_ = owner_check_finished; 747 owner_is_verified_ = owner_check_finished;
747 user_can_login_ = check_result; 748 user_can_login_ = check_result;
748 } 749 }
749 750
750 } // namespace chromeos 751 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698