| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/prefs/public/pref_change_registrar.h" |
| 8 #include "base/time.h" | 9 #include "base/time.h" |
| 9 #include "base/values.h" | 10 #include "base/values.h" |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" | 11 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 11 | 12 |
| 12 namespace options { | 13 namespace options { |
| 13 | 14 |
| 14 class ManagedUserSettingsHandler : public OptionsPageUIHandler { | 15 class ManagedUserSettingsHandler : public OptionsPageUIHandler { |
| 15 public: | 16 public: |
| 16 ManagedUserSettingsHandler(); | 17 ManagedUserSettingsHandler(); |
| 17 virtual ~ManagedUserSettingsHandler(); | 18 virtual ~ManagedUserSettingsHandler(); |
| 18 | 19 |
| 19 // OptionsPageUIHandler implementation. | 20 // OptionsPageUIHandler implementation. |
| 20 virtual void GetLocalizedValues( | 21 virtual void GetLocalizedValues( |
| 21 base::DictionaryValue* localized_strings) OVERRIDE; | 22 base::DictionaryValue* localized_strings) OVERRIDE; |
| 22 | 23 |
| 24 virtual void InitializeHandler() OVERRIDE; |
| 23 virtual void InitializePage() OVERRIDE; | 25 virtual void InitializePage() OVERRIDE; |
| 24 virtual void RegisterMessages() OVERRIDE; | 26 virtual void RegisterMessages() OVERRIDE; |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 // Save user metrics. Called from WebUI. | 29 // Save user metrics. Called from WebUI. |
| 28 void SaveMetrics(const base::ListValue* args); | 30 void SaveMetrics(const base::ListValue* args); |
| 29 | 31 |
| 32 // Called when the local passphrase changes. |
| 33 void OnLocalPassphraseChanged(); |
| 34 |
| 30 // For tracking how long the user spends on this page. | 35 // For tracking how long the user spends on this page. |
| 31 base::TimeTicks start_time_; | 36 base::TimeTicks start_time_; |
| 32 | 37 |
| 38 PrefChangeRegistrar pref_change_registrar_; |
| 39 |
| 33 DISALLOW_COPY_AND_ASSIGN(ManagedUserSettingsHandler); | 40 DISALLOW_COPY_AND_ASSIGN(ManagedUserSettingsHandler); |
| 34 }; | 41 }; |
| 35 | 42 |
| 36 } // namespace options | 43 } // namespace options |
| 37 | 44 |
| 38 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ | 45 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_SETTINGS_HANDLER_H_ |
| OLD | NEW |