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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/prefs/pref_change_registrar.h" | 12 #include "base/prefs/pref_change_registrar.h" |
13 #include "chrome/browser/signin/easy_unlock_service.h" | 13 #include "chrome/browser/signin/easy_unlock_service.h" |
14 | 14 |
| 15 #if defined(OS_CHROMEOS) |
| 16 #include "chrome/browser/chromeos/login/easy_unlock/short_lived_user_context.h" |
| 17 #endif |
| 18 |
15 namespace base { | 19 namespace base { |
16 class DictionaryValue; | 20 class DictionaryValue; |
17 class ListValue; | 21 class ListValue; |
18 } | 22 } |
19 | 23 |
20 class EasyUnlockToggleFlow; | 24 class EasyUnlockToggleFlow; |
21 class Profile; | 25 class Profile; |
22 | 26 |
23 // EasyUnlockService instance that should be used for regular, non-signin | 27 // EasyUnlockService instance that should be used for regular, non-signin |
24 // profiles. | 28 // profiles. |
(...skipping 15 matching lines...) Expand all Loading... |
40 virtual void ClearRemoteDevices() override; | 44 virtual void ClearRemoteDevices() override; |
41 virtual void RunTurnOffFlow() override; | 45 virtual void RunTurnOffFlow() override; |
42 virtual void ResetTurnOffFlow() override; | 46 virtual void ResetTurnOffFlow() override; |
43 virtual TurnOffFlowStatus GetTurnOffFlowStatus() const override; | 47 virtual TurnOffFlowStatus GetTurnOffFlowStatus() const override; |
44 virtual std::string GetChallenge() const override; | 48 virtual std::string GetChallenge() const override; |
45 virtual std::string GetWrappedSecret() const override; | 49 virtual std::string GetWrappedSecret() const override; |
46 virtual void InitializeInternal() override; | 50 virtual void InitializeInternal() override; |
47 virtual void ShutdownInternal() override; | 51 virtual void ShutdownInternal() override; |
48 virtual bool IsAllowedInternal() override; | 52 virtual bool IsAllowedInternal() override; |
49 | 53 |
| 54 // Opens the component packaged app responsible for setting up Smart Lock. |
| 55 void OpenSetupApp(); |
| 56 |
50 // Callback when the controlling pref changes. | 57 // Callback when the controlling pref changes. |
51 void OnPrefsChanged(); | 58 void OnPrefsChanged(); |
52 | 59 |
53 // Sets the new turn-off flow status. | 60 // Sets the new turn-off flow status. |
54 void SetTurnOffFlowStatus(TurnOffFlowStatus status); | 61 void SetTurnOffFlowStatus(TurnOffFlowStatus status); |
55 | 62 |
56 // Callback invoked when turn off flow has finished. | 63 // Callback invoked when turn off flow has finished. |
57 void OnTurnOffFlowFinished(bool success); | 64 void OnTurnOffFlowFinished(bool success); |
58 | 65 |
| 66 #if defined(OS_CHROMEOS) |
| 67 void OnUserContextFromReauth(const chromeos::UserContext& user_context); |
| 68 void OnKeysRefreshedForSetDevices(bool success); |
| 69 |
| 70 scoped_ptr<chromeos::ShortLivedUserContext> short_lived_user_context_; |
| 71 #endif |
| 72 |
59 PrefChangeRegistrar registrar_; | 73 PrefChangeRegistrar registrar_; |
60 | 74 |
61 TurnOffFlowStatus turn_off_flow_status_; | 75 TurnOffFlowStatus turn_off_flow_status_; |
62 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; | 76 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; |
63 | 77 |
| 78 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; |
| 79 |
64 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); | 80 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |
65 }; | 81 }; |
66 | 82 |
67 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ | 83 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
OLD | NEW |