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

Side by Side Diff: chrome/browser/ui/webui/settings/reset_settings_handler.h

Issue 1853413002: MD Settings: Convert reset_page/ to use browser proxy pattern. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeOS tests. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // WebUIMessageHandler implementation. 43 // WebUIMessageHandler implementation.
44 void RegisterMessages() override; 44 void RegisterMessages() override;
45 45
46 protected: 46 protected:
47 ResetSettingsHandler(Profile* profile, bool allow_powerwash); 47 ResetSettingsHandler(Profile* profile, bool allow_powerwash);
48 48
49 // Overriden in tests to substitute with a test version of ProfileResetter. 49 // Overriden in tests to substitute with a test version of ProfileResetter.
50 virtual ProfileResetter* GetResetter(); 50 virtual ProfileResetter* GetResetter();
51 51
52 // Javascript callback to start clearing data. 52 // Javascript callback to start clearing data.
53 void HandleResetProfileSettings(const base::ListValue* value); 53 void HandleResetProfileSettings(const base::ListValue* args);
54 54
55 private: 55 private:
56 // Closes the dialog once all requested settings has been reset. 56 // Closes the dialog once all requested settings has been reset.
57 void OnResetProfileSettingsDone(bool send_feedback); 57 void OnResetProfileSettingsDone(std::string callback_id,
tommycli 2016/04/05 18:46:28 optional nit: The placement of this method (spatia
dpapad 2016/04/05 19:23:12 Yes, done.
58 bool send_feedback);
58 59
59 // Called when the reset profile dialog is shown. 60 // Called when the reset profile dialog is shown.
60 void OnShowResetProfileDialog(const base::ListValue* value); 61 void OnShowResetProfileDialog(const base::ListValue* args);
61 62
62 // Called when the reset profile dialog is hidden. 63 // Called when the reset profile dialog is hidden.
63 void OnHideResetProfileDialog(const base::ListValue* value); 64 void OnHideResetProfileDialog(const base::ListValue* args);
64 65
65 // Called when the reset profile banner is shown. 66 // Called when the reset profile banner is shown.
66 void OnHideResetProfileBanner(const base::ListValue* value); 67 void OnHideResetProfileBanner(const base::ListValue* args);
67 68
68 // Called when BrandcodeConfigFetcher completed fetching settings. 69 // Called when BrandcodeConfigFetcher completed fetching settings.
69 void OnSettingsFetched(); 70 void OnSettingsFetched();
70 71
71 // Resets profile settings to default values. |send_settings| is true if user 72 // Resets profile settings to default values. |send_settings| is true if user
72 // gave his consent to upload broken settings to Google for analysis. 73 // gave his consent to upload broken settings to Google for analysis.
73 void ResetProfile(bool send_settings); 74 void ResetProfile(std::string callback_id, bool send_settings);
74 75
75 // Sets new values for the feedback area. 76 // Sets new values for the feedback area.
76 void UpdateFeedbackUI(); 77 void UpdateFeedbackUI();
77 78
78 #if defined(OS_CHROMEOS) 79 #if defined(OS_CHROMEOS)
79 // Will be called when powerwash dialog is shown. 80 // Will be called when powerwash dialog is shown.
80 void OnShowPowerwashDialog(const base::ListValue* args); 81 void OnShowPowerwashDialog(const base::ListValue* args);
81 82
82 // Sets a pref indicating that a factory reset is requested and then requests 83 // Sets a pref indicating that a factory reset is requested and then requests
83 // a restart. 84 // a restart.
(...skipping 16 matching lines...) Expand all
100 std::string brandcode_; 101 std::string brandcode_;
101 102
102 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; 103 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_;
103 104
104 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); 105 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler);
105 }; 106 };
106 107
107 } // namespace settings 108 } // namespace settings
108 109
109 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ 110 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698