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