| 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 */, |
| 107 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, | 108 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, |
| 108 weak_ptr_factory_.GetWeakPtr())); | 109 weak_ptr_factory_.GetWeakPtr())); |
| 109 } | 110 } |
| 110 | 111 |
| 111 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( | 112 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( |
| 112 const cryptauth::RemoteDeviceList& remote_devices) { | 113 const cryptauth::RemoteDeviceList& remote_devices) { |
| 113 SetProximityAuthDevices(GetAccountId(), remote_devices); | 114 SetProximityAuthDevices(GetAccountId(), remote_devices); |
| 114 | 115 |
| 115 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
| 116 // We need to store a copy of |remote devices_| in the TPM, so it can be | 117 // 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... |
| 593 | 594 |
| 594 cryptauth::CryptAuthDeviceManager* | 595 cryptauth::CryptAuthDeviceManager* |
| 595 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { | 596 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { |
| 596 cryptauth::CryptAuthDeviceManager* manager = | 597 cryptauth::CryptAuthDeviceManager* manager = |
| 597 ChromeCryptAuthServiceFactory::GetInstance() | 598 ChromeCryptAuthServiceFactory::GetInstance() |
| 598 ->GetForBrowserContext(profile()) | 599 ->GetForBrowserContext(profile()) |
| 599 ->GetCryptAuthDeviceManager(); | 600 ->GetCryptAuthDeviceManager(); |
| 600 DCHECK(manager); | 601 DCHECK(manager); |
| 601 return manager; | 602 return manager; |
| 602 } | 603 } |
| OLD | NEW |