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; | |
45 void RunTurnOffFlow() override; | 44 void RunTurnOffFlow() override; |
46 void ResetTurnOffFlow() override; | 45 void ResetTurnOffFlow() override; |
47 TurnOffFlowStatus GetTurnOffFlowStatus() const override; | 46 TurnOffFlowStatus GetTurnOffFlowStatus() const override; |
48 std::string GetChallenge() const override; | 47 std::string GetChallenge() const override; |
49 std::string GetWrappedSecret() const override; | 48 std::string GetWrappedSecret() const override; |
50 void RecordEasySignInOutcome(const std::string& user_id, | 49 void RecordEasySignInOutcome(const std::string& user_id, |
51 bool success) const override; | 50 bool success) const override; |
52 void RecordPasswordLoginEvent(const std::string& user_id) const override; | 51 void RecordPasswordLoginEvent(const std::string& user_id) const override; |
53 void InitializeInternal() override; | 52 void InitializeInternal() override; |
54 void ShutdownInternal() override; | 53 void ShutdownInternal() override; |
55 bool IsAllowedInternal() override; | 54 bool IsAllowedInternal() override; |
56 | 55 |
57 // Opens the component packaged app responsible for setting up Smart Lock. | 56 // Opens the component packaged app responsible for setting up Smart Lock. |
58 void OpenSetupApp(); | 57 void OpenSetupApp(); |
59 | 58 |
60 // Callback when the controlling pref changes. | 59 // Callback when the controlling pref changes. |
61 void OnPrefsChanged(); | 60 void OnPrefsChanged(); |
62 | 61 |
63 // Sets the new turn-off flow status. | 62 // Sets the new turn-off flow status. |
64 void SetTurnOffFlowStatus(TurnOffFlowStatus status); | 63 void SetTurnOffFlowStatus(TurnOffFlowStatus status); |
65 | 64 |
66 // Callback invoked when turn off flow has finished. | 65 // Callback invoked when turn off flow has finished. |
67 void OnTurnOffFlowFinished(bool success); | 66 void OnTurnOffFlowFinished(bool success); |
68 | 67 |
69 #if defined(OS_CHROMEOS) | 68 #if defined(OS_CHROMEOS) |
| 69 // Called with the user's credentials (eg: username and password) after the |
| 70 // user reauthenticates to begin setup. |
70 void OnUserContextFromReauth(const chromeos::UserContext& user_context); | 71 void OnUserContextFromReauth(const chromeos::UserContext& user_context); |
71 void OnKeysRefreshedForSetDevices(bool success); | 72 |
| 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); |
72 | 78 |
73 scoped_ptr<chromeos::ShortLivedUserContext> short_lived_user_context_; | 79 scoped_ptr<chromeos::ShortLivedUserContext> short_lived_user_context_; |
74 #endif | 80 #endif |
75 | 81 |
76 PrefChangeRegistrar registrar_; | 82 PrefChangeRegistrar registrar_; |
77 | 83 |
78 TurnOffFlowStatus turn_off_flow_status_; | 84 TurnOffFlowStatus turn_off_flow_status_; |
79 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; | 85 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; |
80 | 86 |
81 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; | 87 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; |
82 | 88 |
83 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); | 89 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |
84 }; | 90 }; |
85 | 91 |
86 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 92 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
OLD | NEW |