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

Unified Diff: chrome/browser/ui/webui/settings/reset_settings_handler.h

Issue 2784323002: MD Settings: Second try at fixing ResetSettingsHandler crash (Closed)
Patch Set: Created 3 years, 9 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/settings/reset_settings_handler.h
diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler.h b/chrome/browser/ui/webui/settings/reset_settings_handler.h
index bb4d9f2207c61931ef524c92eb0557cbcd3ff6b1..8cd879e44ac7a113797b87e4105adfdf54adb2e9 100644
--- a/chrome/browser/ui/webui/settings/reset_settings_handler.h
+++ b/chrome/browser/ui/webui/settings/reset_settings_handler.h
@@ -82,8 +82,10 @@ class ResetSettingsHandler : public SettingsPageUIHandler {
// Resets profile settings to default values. |send_settings| is true if user
// gave their consent to upload broken settings to Google for analysis.
+ // |callback_id| must be passed by value, as ResetProfile can destroy its
+ // calling callback, which can clobber const-ref parameters.
void ResetProfile(
- const std::string& callback_id,
+ const std::string callback_id,
bool send_settings,
reset_report::ChromeResetReport::ResetRequestOrigin request_origin);

Powered by Google App Engine
This is Rietveld 408576698