| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 SetProximityAuthDevices(GetAccountId(), cryptauth::RemoteDeviceList()); | 98 SetProximityAuthDevices(GetAccountId(), cryptauth::RemoteDeviceList()); |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 | 101 |
| 102 remote_device_loader_.reset(new cryptauth::RemoteDeviceLoader( | 102 remote_device_loader_.reset(new cryptauth::RemoteDeviceLoader( |
| 103 GetCryptAuthDeviceManager()->GetUnlockKeys(), | 103 GetCryptAuthDeviceManager()->GetUnlockKeys(), |
| 104 proximity_auth_client()->GetAccountId(), | 104 proximity_auth_client()->GetAccountId(), |
| 105 GetCryptAuthEnrollmentManager()->GetUserPrivateKey(), | 105 GetCryptAuthEnrollmentManager()->GetUserPrivateKey(), |
| 106 proximity_auth_client()->CreateSecureMessageDelegate())); | 106 proximity_auth_client()->CreateSecureMessageDelegate())); |
| 107 remote_device_loader_->Load( | 107 remote_device_loader_->Load( |
| 108 true /* should_load_beacon_seeds */, |
| 108 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, | 109 base::Bind(&EasyUnlockServiceRegular::OnRemoteDevicesLoaded, |
| 109 weak_ptr_factory_.GetWeakPtr())); | 110 weak_ptr_factory_.GetWeakPtr())); |
| 110 } | 111 } |
| 111 | 112 |
| 112 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( | 113 void EasyUnlockServiceRegular::OnRemoteDevicesLoaded( |
| 113 const cryptauth::RemoteDeviceList& remote_devices) { | 114 const cryptauth::RemoteDeviceList& remote_devices) { |
| 114 SetProximityAuthDevices(GetAccountId(), remote_devices); | 115 SetProximityAuthDevices(GetAccountId(), remote_devices); |
| 115 | 116 |
| 116 #if defined(OS_CHROMEOS) | 117 #if defined(OS_CHROMEOS) |
| 117 // We need to store a copy of |remote devices_| in the TPM, so it can be | 118 // We need to store a copy of |remote devices_| in the TPM, so it can be |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 617 |
| 617 cryptauth::CryptAuthDeviceManager* | 618 cryptauth::CryptAuthDeviceManager* |
| 618 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { | 619 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { |
| 619 cryptauth::CryptAuthDeviceManager* manager = | 620 cryptauth::CryptAuthDeviceManager* manager = |
| 620 ChromeCryptAuthServiceFactory::GetInstance() | 621 ChromeCryptAuthServiceFactory::GetInstance() |
| 621 ->GetForBrowserContext(profile()) | 622 ->GetForBrowserContext(profile()) |
| 622 ->GetCryptAuthDeviceManager(); | 623 ->GetCryptAuthDeviceManager(); |
| 623 DCHECK(manager); | 624 DCHECK(manager); |
| 624 return manager; | 625 return manager; |
| 625 } | 626 } |
| OLD | NEW |