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

Side by Side Diff: chrome/browser/signin/easy_unlock_service.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/easy_unlock_service.h" 5 #include "chrome/browser/signin/easy_unlock_service.h"
6 6
7 #include "apps/app_lifetime_monitor.h" 7 #include "apps/app_lifetime_monitor.h"
8 #include "apps/app_lifetime_monitor_factory.h" 8 #include "apps/app_lifetime_monitor_factory.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 #if defined(OS_CHROMEOS) 50 #if defined(OS_CHROMEOS)
51 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 51 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
52 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager. h" 52 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager. h"
53 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_ factory.h" 53 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_ factory.h"
54 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h" 54 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h"
55 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 55 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
56 #include "chrome/browser/chromeos/profiles/profile_helper.h" 56 #include "chrome/browser/chromeos/profiles/profile_helper.h"
57 #include "chromeos/dbus/dbus_thread_manager.h" 57 #include "chromeos/dbus/dbus_thread_manager.h"
58 #include "chromeos/dbus/power_manager_client.h" 58 #include "chromeos/dbus/power_manager_client.h"
59 #include "components/signin/core/account_id/account_id.h"
59 #include "components/user_manager/user_manager.h" 60 #include "components/user_manager/user_manager.h"
60 #endif 61 #endif
61 62
62 #if defined(OS_WIN) 63 #if defined(OS_WIN)
63 #include "base/win/windows_version.h" 64 #include "base/win/windows_version.h"
64 #endif 65 #endif
65 66
66 using proximity_auth::ScreenlockState; 67 using proximity_auth::ScreenlockState;
67 68
68 namespace { 69 namespace {
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 if (GetHardlockState() == EasyUnlockScreenlockStateHandler::PAIRING_CHANGED || 606 if (GetHardlockState() == EasyUnlockScreenlockStateHandler::PAIRING_CHANGED ||
606 GetHardlockState() == EasyUnlockScreenlockStateHandler::PAIRING_ADDED) { 607 GetHardlockState() == EasyUnlockScreenlockStateHandler::PAIRING_ADDED) {
607 return; 608 return;
608 } 609 }
609 610
610 chromeos::EasyUnlockKeyManager* key_manager = 611 chromeos::EasyUnlockKeyManager* key_manager =
611 chromeos::UserSessionManager::GetInstance()->GetEasyUnlockKeyManager(); 612 chromeos::UserSessionManager::GetInstance()->GetEasyUnlockKeyManager();
612 DCHECK(key_manager); 613 DCHECK(key_manager);
613 614
614 key_manager->GetDeviceDataList( 615 key_manager->GetDeviceDataList(
615 chromeos::UserContext(user_id), 616 chromeos::UserContext(AccountId::FromUserEmail(user_id)),
616 base::Bind(&EasyUnlockService::OnCryptohomeKeysFetchedForChecking, 617 base::Bind(&EasyUnlockService::OnCryptohomeKeysFetchedForChecking,
617 weak_ptr_factory_.GetWeakPtr(), 618 weak_ptr_factory_.GetWeakPtr(), user_id, paired_devices));
618 user_id,
619 paired_devices));
620 #endif 619 #endif
621 } 620 }
622 621
623 void EasyUnlockService::SetTrialRun() { 622 void EasyUnlockService::SetTrialRun() {
624 DCHECK_EQ(GetType(), TYPE_REGULAR); 623 DCHECK_EQ(GetType(), TYPE_REGULAR);
625 624
626 EasyUnlockScreenlockStateHandler* handler = GetScreenlockStateHandler(); 625 EasyUnlockScreenlockStateHandler* handler = GetScreenlockStateHandler();
627 if (handler) 626 if (handler)
628 handler->SetTrialRun(); 627 handler->SetTrialRun();
629 } 628 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 907
909 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 908 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
910 // failed. 909 // failed.
911 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 910 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
912 ->PrepareTpmKey(true /* check_private_key */, 911 ->PrepareTpmKey(true /* check_private_key */,
913 base::Closure()); 912 base::Closure());
914 #endif // defined(OS_CHROMEOS) 913 #endif // defined(OS_CHROMEOS)
915 914
916 tpm_key_checked_ = true; 915 tpm_key_checked_ = true;
917 } 916 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/signin/easy_unlock_service_signin_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698