| 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.h" | 5 #include "chrome/browser/signin/easy_unlock_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "apps/app_lifetime_monitor.h" | 9 #include "apps/app_lifetime_monitor.h" |
| 10 #include "apps/app_lifetime_monitor_factory.h" | 10 #include "apps/app_lifetime_monitor_factory.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 } | 112 } |
| 113 | 113 |
| 114 ~BluetoothDetector() override { | 114 ~BluetoothDetector() override { |
| 115 if (adapter_.get()) | 115 if (adapter_.get()) |
| 116 adapter_->RemoveObserver(this); | 116 adapter_->RemoveObserver(this); |
| 117 apps::AppLifetimeMonitorFactory::GetForBrowserContext(service_->profile()) | 117 apps::AppLifetimeMonitorFactory::GetForBrowserContext(service_->profile()) |
| 118 ->RemoveObserver(this); | 118 ->RemoveObserver(this); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void Initialize() { | 121 void Initialize() { |
| 122 if (!device::BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) | 122 if (!device::BluetoothAdapterFactory::IsBluetoothSupported()) |
| 123 return; | 123 return; |
| 124 | 124 |
| 125 device::BluetoothAdapterFactory::GetAdapter( | 125 device::BluetoothAdapterFactory::GetAdapter( |
| 126 base::Bind(&BluetoothDetector::OnAdapterInitialized, | 126 base::Bind(&BluetoothDetector::OnAdapterInitialized, |
| 127 weak_ptr_factory_.GetWeakPtr())); | 127 weak_ptr_factory_.GetWeakPtr())); |
| 128 } | 128 } |
| 129 | 129 |
| 130 bool IsPresent() const { return adapter_.get() && adapter_->IsPresent(); } | 130 bool IsPresent() const { return adapter_.get() && adapter_->IsPresent(); } |
| 131 | 131 |
| 132 // device::BluetoothAdapter::Observer: | 132 // device::BluetoothAdapter::Observer: |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 | 881 |
| 882 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt | 882 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt |
| 883 // failed. | 883 // failed. |
| 884 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) | 884 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) |
| 885 ->PrepareTpmKey(true /* check_private_key */, | 885 ->PrepareTpmKey(true /* check_private_key */, |
| 886 base::Closure()); | 886 base::Closure()); |
| 887 #endif // defined(OS_CHROMEOS) | 887 #endif // defined(OS_CHROMEOS) |
| 888 | 888 |
| 889 tpm_key_checked_ = true; | 889 tpm_key_checked_ = true; |
| 890 } | 890 } |
| OLD | NEW |