| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // 2) 'Powerwash' dialog (ChromeOS only) | 35 // 2) 'Powerwash' dialog (ChromeOS only) |
| 36 class ResetSettingsHandler : public SettingsPageUIHandler { | 36 class ResetSettingsHandler : public SettingsPageUIHandler { |
| 37 public: | 37 public: |
| 38 ~ResetSettingsHandler() override; | 38 ~ResetSettingsHandler() override; |
| 39 | 39 |
| 40 static ResetSettingsHandler* Create( | 40 static ResetSettingsHandler* Create( |
| 41 content::WebUIDataSource* html_source, Profile* profile); | 41 content::WebUIDataSource* html_source, Profile* profile); |
| 42 | 42 |
| 43 // WebUIMessageHandler implementation. | 43 // WebUIMessageHandler implementation. |
| 44 void RegisterMessages() override; | 44 void RegisterMessages() override; |
| 45 void OnJavascriptAllowed() override {} |
| 46 void OnJavascriptDisallowed() override {} |
| 45 | 47 |
| 46 protected: | 48 protected: |
| 47 ResetSettingsHandler(Profile* profile, bool allow_powerwash); | 49 ResetSettingsHandler(Profile* profile, bool allow_powerwash); |
| 48 | 50 |
| 49 // Overriden in tests to substitute with a test version of ProfileResetter. | 51 // Overriden in tests to substitute with a test version of ProfileResetter. |
| 50 virtual ProfileResetter* GetResetter(); | 52 virtual ProfileResetter* GetResetter(); |
| 51 | 53 |
| 52 // Javascript callback to start clearing data. | 54 // Javascript callback to start clearing data. |
| 53 void HandleResetProfileSettings(const base::ListValue* args); | 55 void HandleResetProfileSettings(const base::ListValue* args); |
| 54 | 56 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 std::string brandcode_; | 106 std::string brandcode_; |
| 105 | 107 |
| 106 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; | 108 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; |
| 107 | 109 |
| 108 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); | 110 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace settings | 113 } // namespace settings |
| 112 | 114 |
| 113 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 115 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
| OLD | NEW |