OLD | NEW |
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_regular.h" | 5 #include "chrome/browser/signin/easy_unlock_service_regular.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 SetProximityAuthDevices(GetAccountId(), cryptauth::RemoteDeviceList()); | 97 SetProximityAuthDevices(GetAccountId(), cryptauth::RemoteDeviceList()); |
98 return; | 98 return; |
99 } | 99 } |
100 | 100 |
101 remote_device_loader_.reset(new cryptauth::RemoteDeviceLoader( | 101 remote_device_loader_.reset(new cryptauth::RemoteDeviceLoader( |
102 GetCryptAuthDeviceManager()->GetUnlockKeys(), | 102 GetCryptAuthDeviceManager()->GetUnlockKeys(), |
103 proximity_auth_client()->GetAccountId(), | 103 proximity_auth_client()->GetAccountId(), |
104 GetCryptAuthEnrollmentManager()->GetUserPrivateKey(), | 104 GetCryptAuthEnrollmentManager()->GetUserPrivateKey(), |
105 proximity_auth_client()->CreateSecureMessageDelegate())); | 105 proximity_auth_client()->CreateSecureMessageDelegate())); |
106 remote_device_loader_->Load( | 106 remote_device_loader_->Load( |
107 true /* should_load_beacon_seeds */, | |
108 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, | 107 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, |
109 weak_ptr_factory_.GetWeakPtr())); | 108 weak_ptr_factory_.GetWeakPtr())); |
110 } | 109 } |
111 | 110 |
112 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( | 111 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( |
113 const cryptauth::RemoteDeviceList& remote_devices) { | 112 const cryptauth::RemoteDeviceList& remote_devices) { |
114 SetProximityAuthDevices(GetAccountId(), remote_devices); | 113 SetProximityAuthDevices(GetAccountId(), remote_devices); |
115 | 114 |
116 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
117 // We need to store a copy of |remote devices_| in the TPM, so it can be | 116 // We need to store a copy of |remote devices_| in the TPM, so it can be |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 593 |
595 cryptauth::CryptAuthDeviceManager* | 594 cryptauth::CryptAuthDeviceManager* |
596 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { | 595 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { |
597 cryptauth::CryptAuthDeviceManager* manager = | 596 cryptauth::CryptAuthDeviceManager* manager = |
598 ChromeCryptAuthServiceFactory::GetInstance() | 597 ChromeCryptAuthServiceFactory::GetInstance() |
599 ->GetForBrowserContext(profile()) | 598 ->GetForBrowserContext(profile()) |
600 ->GetCryptAuthDeviceManager(); | 599 ->GetCryptAuthDeviceManager(); |
601 DCHECK(manager); | 600 DCHECK(manager); |
602 return manager; | 601 return manager; |
603 } | 602 } |
OLD | NEW |