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

Unified Diff: chrome/browser/ui/webui/options/reset_profile_settings_handler.h

Issue 14924002: WebUI for Profile Settings Reset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 7 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/ui/webui/options/reset_profile_settings_handler.h
diff --git a/chrome/browser/ui/webui/options/reset_profile_settings_handler.h b/chrome/browser/ui/webui/options/reset_profile_settings_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..3375fdfbec12ce902ddc3580237ac538cd7471d1
--- /dev/null
+++ b/chrome/browser/ui/webui/options/reset_profile_settings_handler.h
@@ -0,0 +1,51 @@
+// Copyright 2013 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_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/ui/webui/options/options_ui.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+} // namespace base
+
+class ProfileResetter;
+
+namespace options {
+
+// Reset Profile Settings handler page UI handler.
+class ResetProfileSettingsHandler
+ : public OptionsPageUIHandler,
+ public base::SupportsWeakPtr<ResetProfileSettingsHandler> {
+ public:
+ ResetProfileSettingsHandler();
+ virtual ~ResetProfileSettingsHandler();
+
+ // OptionsPageUIHandler implementation.
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
+ virtual void InitializeHandler() OVERRIDE;
+
+ // WebUIMessageHandler implementation.
+ virtual void RegisterMessages() OVERRIDE;
+
+ private:
+ // Javascript callback to start clearing data.
+ void HandleResetProfileSettings(const base::ListValue* value);
+
+ // Closes the dialog once all requested settings has been reset.
+ void OnResetProfileSettingsDone();
+
+ scoped_ptr<ProfileResetter> resetter_;
+
+ DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler);
+};
+
+} // namespace options
+
+#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698