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 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Loads the RemoteDevice instances that will be supplied to | 70 // Loads the RemoteDevice instances that will be supplied to |
71 // ProximityAuthSystem. | 71 // ProximityAuthSystem. |
72 void LoadRemoteDevices(); | 72 void LoadRemoteDevices(); |
73 | 73 |
74 // Called when |remote_device_loader_| completes. | 74 // Called when |remote_device_loader_| completes. |
75 void OnRemoteDevicesLoaded( | 75 void OnRemoteDevicesLoaded( |
76 const std::vector<proximity_auth::RemoteDevice>& remote_devices); | 76 const std::vector<proximity_auth::RemoteDevice>& remote_devices); |
77 | 77 |
78 // EasyUnlockService implementation: | 78 // EasyUnlockService implementation: |
79 EasyUnlockService::Type GetType() const override; | 79 EasyUnlockService::Type GetType() const override; |
80 std::string GetUserEmail() const override; | 80 AccountId GetAccountId() const override; |
81 void LaunchSetup() override; | 81 void LaunchSetup() override; |
82 const base::DictionaryValue* GetPermitAccess() const override; | 82 const base::DictionaryValue* GetPermitAccess() const override; |
83 void SetPermitAccess(const base::DictionaryValue& permit) override; | 83 void SetPermitAccess(const base::DictionaryValue& permit) override; |
84 void ClearPermitAccess() override; | 84 void ClearPermitAccess() override; |
85 const base::ListValue* GetRemoteDevices() const override; | 85 const base::ListValue* GetRemoteDevices() const override; |
86 void SetRemoteDevices(const base::ListValue& devices) override; | 86 void SetRemoteDevices(const base::ListValue& devices) override; |
87 void SetRemoteBleDevices(const base::ListValue& devices) override; | 87 void SetRemoteBleDevices(const base::ListValue& devices) override; |
88 void RunTurnOffFlow() override; | 88 void RunTurnOffFlow() override; |
89 void ResetTurnOffFlow() override; | 89 void ResetTurnOffFlow() override; |
90 TurnOffFlowStatus GetTurnOffFlowStatus() const override; | 90 TurnOffFlowStatus GetTurnOffFlowStatus() const override; |
91 std::string GetChallenge() const override; | 91 std::string GetChallenge() const override; |
92 std::string GetWrappedSecret() const override; | 92 std::string GetWrappedSecret() const override; |
93 void RecordEasySignInOutcome(const std::string& user_id, | 93 void RecordEasySignInOutcome(const AccountId& account_id, |
94 bool success) const override; | 94 bool success) const override; |
95 void RecordPasswordLoginEvent(const std::string& user_id) const override; | 95 void RecordPasswordLoginEvent(const AccountId& account_id) const override; |
96 void StartAutoPairing(const AutoPairingResultCallback& callback) override; | 96 void StartAutoPairing(const AutoPairingResultCallback& callback) override; |
97 void SetAutoPairingResult(bool success, const std::string& error) override; | 97 void SetAutoPairingResult(bool success, const std::string& error) override; |
98 void InitializeInternal() override; | 98 void InitializeInternal() override; |
99 void ShutdownInternal() override; | 99 void ShutdownInternal() override; |
100 bool IsAllowedInternal() const override; | 100 bool IsAllowedInternal() const override; |
101 void OnWillFinalizeUnlock(bool success) override; | 101 void OnWillFinalizeUnlock(bool success) override; |
102 void OnSuspendDoneInternal() override; | 102 void OnSuspendDoneInternal() override; |
103 | 103 |
104 // OAuth2TokenService::Observer: | 104 // OAuth2TokenService::Observer: |
105 void OnRefreshTokenAvailable(const std::string& account_id) override; | 105 void OnRefreshTokenAvailable(const std::string& account_id) override; |
106 | 106 |
107 // CryptAuthDeviceManager::Observer: | 107 // CryptAuthDeviceManager::Observer: |
108 void OnSyncFinished( | 108 void OnSyncFinished( |
109 proximity_auth::CryptAuthDeviceManager::SyncResult sync_result, | 109 proximity_auth::CryptAuthDeviceManager::SyncResult sync_result, |
110 proximity_auth::CryptAuthDeviceManager::DeviceChangeResult | 110 proximity_auth::CryptAuthDeviceManager::DeviceChangeResult |
111 device_change_result) override; | 111 device_change_result) override; |
112 | 112 |
113 // proximity_auth::ScreenlockBridge::Observer implementation: | 113 // proximity_auth::ScreenlockBridge::Observer implementation: |
114 void OnScreenDidLock(proximity_auth::ScreenlockBridge::LockHandler::ScreenType | 114 void OnScreenDidLock(proximity_auth::ScreenlockBridge::LockHandler::ScreenType |
115 screen_type) override; | 115 screen_type) override; |
116 void OnScreenDidUnlock( | 116 void OnScreenDidUnlock( |
117 proximity_auth::ScreenlockBridge::LockHandler::ScreenType screen_type) | 117 proximity_auth::ScreenlockBridge::LockHandler::ScreenType screen_type) |
118 override; | 118 override; |
119 void OnFocusedUserChanged(const std::string& user_id) override; | 119 void OnFocusedUserChanged(const AccountId& account_id) override; |
120 | |
121 | 120 |
122 // Callback when the controlling pref changes. | 121 // Callback when the controlling pref changes. |
123 void OnPrefsChanged(); | 122 void OnPrefsChanged(); |
124 | 123 |
125 // Sets the new turn-off flow status. | 124 // Sets the new turn-off flow status. |
126 void SetTurnOffFlowStatus(TurnOffFlowStatus status); | 125 void SetTurnOffFlowStatus(TurnOffFlowStatus status); |
127 | 126 |
128 // Callback for ToggleEasyUnlock CryptAuth API. | 127 // Callback for ToggleEasyUnlock CryptAuth API. |
129 void OnToggleEasyUnlockApiComplete( | 128 void OnToggleEasyUnlockApiComplete( |
130 const cryptauth::ToggleEasyUnlockResponse& response); | 129 const cryptauth::ToggleEasyUnlockResponse& response); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // this deferment prevents the lock screen from being changed by a network | 189 // this deferment prevents the lock screen from being changed by a network |
191 // event. | 190 // event. |
192 bool deferring_device_load_; | 191 bool deferring_device_load_; |
193 | 192 |
194 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; | 193 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; |
195 | 194 |
196 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); | 195 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |
197 }; | 196 }; |
198 | 197 |
199 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 198 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
OLD | NEW |