| 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 "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" |
| 11 #include "base/guid.h" | 11 #include "base/guid.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
| 14 #include "base/prefs/pref_registry_simple.h" | 14 #include "base/prefs/pref_registry_simple.h" |
| 15 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
| 16 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
| 17 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/signin/easy_unlock_app_manager.h" | 22 #include "chrome/browser/signin/easy_unlock_app_manager.h" |
| 23 #include "chrome/browser/signin/easy_unlock_service_factory.h" | 23 #include "chrome/browser/signin/easy_unlock_service_factory.h" |
| 24 #include "chrome/browser/signin/easy_unlock_service_observer.h" | 24 #include "chrome/browser/signin/easy_unlock_service_observer.h" |
| 25 #include "chrome/browser/signin/screenlock_bridge.h" | |
| 26 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/common/extensions/extension_constants.h" | 26 #include "chrome/common/extensions/extension_constants.h" |
| 28 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 29 #include "components/pref_registry/pref_registry_syncable.h" | 28 #include "components/pref_registry/pref_registry_syncable.h" |
| 30 #include "components/proximity_auth/ble/proximity_auth_ble_system.h" | 29 #include "components/proximity_auth/ble/proximity_auth_ble_system.h" |
| 31 #include "components/proximity_auth/switches.h" | 30 #include "components/proximity_auth/switches.h" |
| 31 #include "components/signin/content/screenlock_bridge.h" |
| 32 #include "components/user_manager/user.h" | 32 #include "components/user_manager/user.h" |
| 33 #include "device/bluetooth/bluetooth_adapter.h" | 33 #include "device/bluetooth/bluetooth_adapter.h" |
| 34 #include "device/bluetooth/bluetooth_adapter_factory.h" | 34 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 35 | 35 |
| 36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 37 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" | 37 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" |
| 38 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.
h" | 38 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.
h" |
| 39 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_
factory.h" | 39 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_
factory.h" |
| 40 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 40 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 41 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 41 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 | 866 |
| 867 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt | 867 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt |
| 868 // failed. | 868 // failed. |
| 869 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) | 869 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) |
| 870 ->PrepareTpmKey(true /* check_private_key */, | 870 ->PrepareTpmKey(true /* check_private_key */, |
| 871 base::Closure()); | 871 base::Closure()); |
| 872 #endif // defined(OS_CHROMEOS) | 872 #endif // defined(OS_CHROMEOS) |
| 873 | 873 |
| 874 tpm_key_checked_ = true; | 874 tpm_key_checked_ = true; |
| 875 } | 875 } |
| OLD | NEW |