Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6203)

Unified Diff: chrome/browser/signin/easy_unlock_service.h

Issue 1372283002: Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: remove log Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/signin/easy_unlock_auth_attempt.cc ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service.h
diff --git a/chrome/browser/signin/easy_unlock_service.h b/chrome/browser/signin/easy_unlock_service.h
index 518e31696187a2df1691ee714bcf09652ce476b0..240a5f887df9ea1e5b4e710be1d8fa4f939eb9bf 100644
--- a/chrome/browser/signin/easy_unlock_service.h
+++ b/chrome/browser/signin/easy_unlock_service.h
@@ -39,6 +39,8 @@ class PrefRegistrySyncable;
namespace proximity_auth {
class ProximityAuthBleSystem;
+class ProximityAuthSystem;
+struct RemoteDevice;
}
class EasyUnlockAppManager;
@@ -241,7 +243,7 @@ class EasyUnlockService : public KeyedService {
virtual void OnWillFinalizeUnlock(bool success) = 0;
// Called when the local device resumes after a suspend.
- virtual void OnSuspendDone() = 0;
+ virtual void OnSuspendDoneInternal() = 0;
// KeyedService override:
void Shutdown() override;
@@ -294,6 +296,12 @@ class EasyUnlockService : public KeyedService {
// according to the current state of the service.
EasyUnlockAuthEvent GetPasswordAuthEvent() const;
+ // Called by subclasses when the remote device allowed to unlock the screen
+ // changes. If |remote_device| is not null, then |proximity_auth_system_| will
+ // be recreated with the new remote device. Otherwise,
+ // |proximity_auth_system_| will be destroyed if no |remote_device| is set.
+ void OnRemoteDeviceChanged(const proximity_auth::RemoteDevice* remote_device);
+
private:
// A class to detect whether a bluetooth adapter is present.
class BluetoothDetector;
@@ -322,6 +330,9 @@ class EasyUnlockService : public KeyedService {
// Updates the service to state for handling system suspend.
void PrepareForSuspend();
+ // Called when the system resumes from a suspended state.
+ void OnSuspendDone();
+
void EnsureTpmKeyPresentIfNeeded();
Profile* const profile_;
@@ -337,12 +348,16 @@ class EasyUnlockService : public KeyedService {
// progress.
scoped_ptr<EasyUnlockAuthAttempt> auth_attempt_;
+ // Detects when the system Bluetooth adapter status changes.
scoped_ptr<BluetoothDetector> bluetooth_detector_;
- // The proximity auth over Bluetooth Low Energy system. This is main entry
- // point to bootstap Smart Lock to discover phones over Bluetooth Low
- // Energy.
- scoped_ptr<proximity_auth::ProximityAuthBleSystem> proximity_auth_ble_system_;
+ // Handles connecting, authenticating, and updating the UI on the lock/sign-in
+ // screen. After a |RemoteDevice| instance is provided, this object will
+ // handle the rest.
+ // TODO(tengs): This object is intended as a replacement of the background
+ // page of the easy_unlock Chrome app. We are in the process of removing the
+ // app in favor of |proximity_auth_system_|.
+ scoped_ptr<proximity_auth::ProximityAuthSystem> proximity_auth_system_;
#if defined(OS_CHROMEOS)
// Monitors suspend and wake state of ChromeOS.
« no previous file with comments | « chrome/browser/signin/easy_unlock_auth_attempt.cc ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698