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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void OnHideResetProfileBanner(const base::ListValue* args); | 75 void OnHideResetProfileBanner(const base::ListValue* args); |
76 | 76 |
77 // Retrieve the triggered reset tool name, called from Javascript. | 77 // Retrieve the triggered reset tool name, called from Javascript. |
78 void HandleGetTriggeredResetToolName(const base::ListValue* args); | 78 void HandleGetTriggeredResetToolName(const base::ListValue* args); |
79 | 79 |
80 // Called when BrandcodeConfigFetcher completed fetching settings. | 80 // Called when BrandcodeConfigFetcher completed fetching settings. |
81 void OnSettingsFetched(); | 81 void OnSettingsFetched(); |
82 | 82 |
83 // Resets profile settings to default values. |send_settings| is true if user | 83 // Resets profile settings to default values. |send_settings| is true if user |
84 // gave their consent to upload broken settings to Google for analysis. | 84 // gave their consent to upload broken settings to Google for analysis. |
| 85 // |callback_id| must be passed by value, as ResetProfile can destroy its |
| 86 // calling callback, which can clobber const-ref parameters. |
85 void ResetProfile( | 87 void ResetProfile( |
86 const std::string& callback_id, | 88 const std::string callback_id, |
87 bool send_settings, | 89 bool send_settings, |
88 reset_report::ChromeResetReport::ResetRequestOrigin request_origin); | 90 reset_report::ChromeResetReport::ResetRequestOrigin request_origin); |
89 | 91 |
90 // Closes the dialog once all requested settings has been reset. | 92 // Closes the dialog once all requested settings has been reset. |
91 void OnResetProfileSettingsDone( | 93 void OnResetProfileSettingsDone( |
92 std::string callback_id, | 94 std::string callback_id, |
93 bool send_feedback, | 95 bool send_feedback, |
94 reset_report::ChromeResetReport::ResetRequestOrigin request_origin); | 96 reset_report::ChromeResetReport::ResetRequestOrigin request_origin); |
95 | 97 |
96 #if defined(OS_CHROMEOS) | 98 #if defined(OS_CHROMEOS) |
(...skipping 14 matching lines...) Expand all Loading... |
111 std::string brandcode_; | 113 std::string brandcode_; |
112 | 114 |
113 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; | 115 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; |
114 | 116 |
115 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); | 117 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); |
116 }; | 118 }; |
117 | 119 |
118 } // namespace settings | 120 } // namespace settings |
119 | 121 |
120 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 122 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
OLD | NEW |