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

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: rebase 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 517 }
518 // Now we can continue reading the private key. 518 // Now we can continue reading the private key.
519 DeviceSettingsService::Get()->SetUsername( 519 DeviceSettingsService::Get()->SetUsername(
520 current_state_->user_context.username); 520 current_state_->user_context.username);
521 DeviceSettingsService::Get()->GetOwnershipStatusAsync( 521 DeviceSettingsService::Get()->GetOwnershipStatusAsync(
522 base::Bind(&ParallelAuthenticator::OnOwnershipChecked, this)); 522 base::Bind(&ParallelAuthenticator::OnOwnershipChecked, this));
523 return false; 523 return false;
524 } 524 }
525 525
526 void ParallelAuthenticator::OnOwnershipChecked( 526 void ParallelAuthenticator::OnOwnershipChecked(
527 DeviceSettingsService::OwnershipStatus status, 527 DeviceSettingsService::OwnershipStatus status) {
528 bool is_owner) {
529 // Now we can check if this user is the owner. 528 // Now we can check if this user is the owner.
530 user_can_login_ = is_owner; 529 // TODO(tbarzic): This is broken. At this point, DeviceSettingsService will
530 // never have private key loaded (http://crbug.com/285450).
531 user_can_login_ = DeviceSettingsService::Get()->HasPrivateOwnerKey();
531 owner_is_verified_ = true; 532 owner_is_verified_ = true;
532 Resolve(); 533 Resolve();
533 } 534 }
534 535
535 void ParallelAuthenticator::Resolve() { 536 void ParallelAuthenticator::Resolve() {
536 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 537 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
537 bool request_pending = false; 538 bool request_pending = false;
538 int mount_flags = cryptohome::MOUNT_FLAGS_NONE; 539 int mount_flags = cryptohome::MOUNT_FLAGS_NONE;
539 ParallelAuthenticator::AuthState state = ResolveState(); 540 ParallelAuthenticator::AuthState state = ResolveState();
540 VLOG(1) << "Resolved state to: " << state; 541 VLOG(1) << "Resolved state to: " << state;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 Resolve(); 836 Resolve();
836 } 837 }
837 838
838 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, 839 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished,
839 bool check_result) { 840 bool check_result) {
840 owner_is_verified_ = owner_check_finished; 841 owner_is_verified_ = owner_check_finished;
841 user_can_login_ = check_result; 842 user_can_login_ = check_result;
842 } 843 }
843 844
844 } // namespace chromeos 845 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator.h ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698