Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: chrome/browser/signin/easy_unlock_service_regular.h

Issue 577683002: Introduce EasyUnlockService class for signin profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/easy_unlock_service_regular.h
diff --git a/chrome/browser/signin/easy_unlock_service_regular.h b/chrome/browser/signin/easy_unlock_service_regular.h
new file mode 100644
index 0000000000000000000000000000000000000000..78c45718ac0d904492bb83657c143a66cca31adf
--- /dev/null
+++ b/chrome/browser/signin/easy_unlock_service_regular.h
@@ -0,0 +1,64 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
+#define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/prefs/pref_change_registrar.h"
+#include "chrome/browser/signin/easy_unlock_service.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+}
+
+class EasyUnlockToggleFlow;
+class Profile;
+
+// EasyUnlockService instance that should be used for regular, non-signin
+// profiles.
+class EasyUnlockServiceRegular : public EasyUnlockService {
+ public:
+ explicit EasyUnlockServiceRegular(Profile* profile);
+ virtual ~EasyUnlockServiceRegular();
+
+ private:
+ // EasyUnlockService implementation.
+ virtual EasyUnlockService::Type GetType() const OVERRIDE;
+ virtual std::string GetUserEmail() const OVERRIDE;
+ virtual void LaunchSetup() OVERRIDE;
+ virtual const base::DictionaryValue* GetPermitAccess() const OVERRIDE;
+ virtual void SetPermitAccess(const base::DictionaryValue& permit) OVERRIDE;
+ virtual void ClearPermitAccess() OVERRIDE;
+ virtual const base::ListValue* GetRemoteDevices() const OVERRIDE;
+ virtual void SetRemoteDevices(const base::ListValue& devices) OVERRIDE;
+ virtual void ClearRemoteDevices() OVERRIDE;
+ virtual void RunTurnOffFlow() OVERRIDE;
+ virtual void ResetTurnOffFlow() OVERRIDE;
+ virtual TurnOffFlowStatus GetTurnOffFlowStatus() const OVERRIDE;
+ virtual void InitializeInternal() OVERRIDE;
+ virtual bool IsAllowedInternal() OVERRIDE;
+
+ // Callback when the controlling pref changes.
+ void OnPrefsChanged();
+
+ // Sets the new turn-off flow status.
+ void SetTurnOffFlowStatus(TurnOffFlowStatus status);
+
+ // Callback invoked when turn off flow has finished.
+ void OnTurnOffFlowFinished(bool success);
+
+ PrefChangeRegistrar registrar_;
+
+ TurnOffFlowStatus turn_off_flow_status_;
+ scoped_ptr<EasyUnlockToggleFlow> turn_off_flow_;
+
+ DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular);
+};
+
+#endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
« no previous file with comments | « chrome/browser/signin/easy_unlock_service_factory.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698