Index: chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h |
diff --git a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h |
index 93a990403ee8693548d5ea325bec6ecb9241e8e8..37d2e028a6c32e8ba9375775c0434ffbcb85c204 100644 |
--- a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h |
+++ b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h |
@@ -8,6 +8,7 @@ |
#include "base/macros.h" |
#include "chrome/browser/signin/easy_unlock_service_observer.h" |
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
+#include "components/prefs/pref_change_registrar.h" |
namespace content { |
class WebUIDataSource; |
@@ -30,6 +31,7 @@ class EasyUnlockSettingsHandler : public ::settings::SettingsPageUIHandler, |
// SettingsPageUIHandler: |
void RegisterMessages() override; |
+ void RenderViewReused() override; |
// EasyUnlockServiceObserver: |
void OnTurnOffOperationStatusChanged() override; |
@@ -38,17 +40,24 @@ class EasyUnlockSettingsHandler : public ::settings::SettingsPageUIHandler, |
explicit EasyUnlockSettingsHandler(Profile* profile); |
private: |
+ FRIEND_TEST_ALL_PREFIXES(EasyUnlockSettingsHandlerTest, EnabledStatus); |
FRIEND_TEST_ALL_PREFIXES(EasyUnlockSettingsHandlerTest, TurnOffStatus); |
+ void SendEnabledStatus(); |
void SendTurnOffOperationStatus(); |
// JS callbacks. |
+ void HandleGetEnabledStatus(const base::ListValue* args); |
void HandleGetTurnOffFlowStatus(const base::ListValue* args); |
void HandleRequestTurnOff(const base::ListValue* args); |
void HandlePageDismissed(const base::ListValue* args); |
Profile* const profile_; |
+ PrefChangeRegistrar profile_pref_registrar_; |
+ |
+ bool observers_registered_; |
+ |
DISALLOW_COPY_AND_ASSIGN(EasyUnlockSettingsHandler); |
}; |