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/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 private: | 34 private: |
35 // EasyUnlockService implementation. | 35 // EasyUnlockService implementation. |
36 EasyUnlockService::Type GetType() const override; | 36 EasyUnlockService::Type GetType() const override; |
37 std::string GetUserEmail() const override; | 37 std::string GetUserEmail() const override; |
38 void LaunchSetup() override; | 38 void LaunchSetup() override; |
39 const base::DictionaryValue* GetPermitAccess() const override; | 39 const base::DictionaryValue* GetPermitAccess() const override; |
40 void SetPermitAccess(const base::DictionaryValue& permit) override; | 40 void SetPermitAccess(const base::DictionaryValue& permit) override; |
41 void ClearPermitAccess() override; | 41 void ClearPermitAccess() override; |
42 const base::ListValue* GetRemoteDevices() const override; | 42 const base::ListValue* GetRemoteDevices() const override; |
43 void SetRemoteDevices(const base::ListValue& devices) override; | 43 void SetRemoteDevices(const base::ListValue& devices) override; |
| 44 void ClearRemoteDevices() override; |
44 void RunTurnOffFlow() override; | 45 void RunTurnOffFlow() override; |
45 void ResetTurnOffFlow() override; | 46 void ResetTurnOffFlow() override; |
46 TurnOffFlowStatus GetTurnOffFlowStatus() const override; | 47 TurnOffFlowStatus GetTurnOffFlowStatus() const override; |
47 std::string GetChallenge() const override; | 48 std::string GetChallenge() const override; |
48 std::string GetWrappedSecret() const override; | 49 std::string GetWrappedSecret() const override; |
49 void RecordEasySignInOutcome(const std::string& user_id, | 50 void RecordEasySignInOutcome(const std::string& user_id, |
50 bool success) const override; | 51 bool success) const override; |
51 void RecordPasswordLoginEvent(const std::string& user_id) const override; | 52 void RecordPasswordLoginEvent(const std::string& user_id) const override; |
52 void InitializeInternal() override; | 53 void InitializeInternal() override; |
53 void ShutdownInternal() override; | 54 void ShutdownInternal() override; |
54 bool IsAllowedInternal() override; | 55 bool IsAllowedInternal() override; |
55 | 56 |
56 // Opens the component packaged app responsible for setting up Smart Lock. | 57 // Opens the component packaged app responsible for setting up Smart Lock. |
57 void OpenSetupApp(); | 58 void OpenSetupApp(); |
58 | 59 |
59 // Callback when the controlling pref changes. | 60 // Callback when the controlling pref changes. |
60 void OnPrefsChanged(); | 61 void OnPrefsChanged(); |
61 | 62 |
62 // Sets the new turn-off flow status. | 63 // Sets the new turn-off flow status. |
63 void SetTurnOffFlowStatus(TurnOffFlowStatus status); | 64 void SetTurnOffFlowStatus(TurnOffFlowStatus status); |
64 | 65 |
65 // Callback invoked when turn off flow has finished. | 66 // Callback invoked when turn off flow has finished. |
66 void OnTurnOffFlowFinished(bool success); | 67 void OnTurnOffFlowFinished(bool success); |
67 | 68 |
68 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
69 // Called with the user's credentials (e.g. username and password) after the | |
70 // user reauthenticates to begin setup. | |
71 void OnUserContextFromReauth(const chromeos::UserContext& user_context); | 70 void OnUserContextFromReauth(const chromeos::UserContext& user_context); |
72 | 71 void OnKeysRefreshedForSetDevices(bool success); |
73 // Called after a cryptohome RemoveKey or RefreshKey operation to set the | |
74 // proper hardlock state if the operation is successful. | |
75 void SetHardlockAfterKeyOperation( | |
76 EasyUnlockScreenlockStateHandler::HardlockState state_on_success, | |
77 bool success); | |
78 | 72 |
79 scoped_ptr<chromeos::ShortLivedUserContext> short_lived_user_context_; | 73 scoped_ptr<chromeos::ShortLivedUserContext> short_lived_user_context_; |
80 #endif | 74 #endif |
81 | 75 |
82 PrefChangeRegistrar registrar_; | 76 PrefChangeRegistrar registrar_; |
83 | 77 |
84 TurnOffFlowStatus turn_off_flow_status_; | 78 TurnOffFlowStatus turn_off_flow_status_; |
85 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; | 79 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; |
86 | 80 |
87 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; | 81 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; |
88 | 82 |
89 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); | 83 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |
90 }; | 84 }; |
91 | 85 |
92 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 86 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
OLD | NEW |