OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/prefs/pref_change_registrar.h" |
| 13 #include "chrome/browser/signin/easy_unlock_service.h" |
| 14 |
| 15 namespace base { |
| 16 class DictionaryValue; |
| 17 class ListValue; |
| 18 } |
| 19 |
| 20 class EasyUnlockToggleFlow; |
| 21 class Profile; |
| 22 |
| 23 // EasyUnlockService instance that should be used for regular, non-signin |
| 24 // profiles. |
| 25 class EasyUnlockServiceRegular : public EasyUnlockService { |
| 26 public: |
| 27 explicit EasyUnlockServiceRegular(Profile* profile); |
| 28 virtual ~EasyUnlockServiceRegular(); |
| 29 |
| 30 private: |
| 31 // EasyUnlockService implementation. |
| 32 virtual EasyUnlockService::Type GetType() const OVERRIDE; |
| 33 virtual std::string GetUserEmail() const OVERRIDE; |
| 34 virtual void LaunchSetup() OVERRIDE; |
| 35 virtual const base::DictionaryValue* GetPermitAccess() const OVERRIDE; |
| 36 virtual void SetPermitAccess(const base::DictionaryValue& permit) OVERRIDE; |
| 37 virtual void ClearPermitAccess() OVERRIDE; |
| 38 virtual const base::ListValue* GetRemoteDevices() const OVERRIDE; |
| 39 virtual void SetRemoteDevices(const base::ListValue& devices) OVERRIDE; |
| 40 virtual void ClearRemoteDevices() OVERRIDE; |
| 41 virtual void RunTurnOffFlow() OVERRIDE; |
| 42 virtual void ResetTurnOffFlow() OVERRIDE; |
| 43 virtual TurnOffFlowStatus GetTurnOffFlowStatus() const OVERRIDE; |
| 44 virtual void InitializeInternal() OVERRIDE; |
| 45 virtual bool IsAllowedInternal() OVERRIDE; |
| 46 |
| 47 // Callback when the controlling pref changes. |
| 48 void OnPrefsChanged(); |
| 49 |
| 50 // Sets the new turn-off flow status. |
| 51 void SetTurnOffFlowStatus(TurnOffFlowStatus status); |
| 52 |
| 53 // Callback invoked when turn off flow has finished. |
| 54 void OnTurnOffFlowFinished(bool success); |
| 55 |
| 56 PrefChangeRegistrar registrar_; |
| 57 |
| 58 TurnOffFlowStatus turn_off_flow_status_; |
| 59 scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_; |
| 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |
| 62 }; |
| 63 |
| 64 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ |
OLD | NEW |