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

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

Issue 2236663002: Add origin of settings reset request to feedback reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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.cc
diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler.cc b/chrome/browser/ui/webui/settings/reset_settings_handler.cc
index 86cbea2a332f68d8d297588f743fc31a52fc5acd..da9fa418ad712b893324eb329ba6a0ba7b9dff5f 100644
--- a/chrome/browser/ui/webui/settings/reset_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/reset_settings_handler.cc
@@ -35,7 +35,6 @@
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/reset/metrics.h"
#include "chrome/common/pref_names.h"
-#include "components/prefs/pref_service.h"
#include "components/user_manager/user_manager.h"
#endif // defined(OS_CHROMEOS)
@@ -135,8 +134,16 @@ void ResetSettingsHandler::OnResetProfileSettingsDone(
setting_snapshot_->Subtract(current_snapshot);
std::unique_ptr<reset_report::ChromeResetReport> report_proto =
SerializeSettingsReportToProto(*setting_snapshot_, difference);
- if (report_proto)
+ if (report_proto) {
+ // The material design version of the settings page currently does not
+ // expose the alternative ways, made available by the old settings page,
+ // to get to the reset settings dialog. Until those are available, we
+ // can assume that all reset requests came directly from user
+ // navigation.
+ report_proto->set_reset_request_origin(
+ reset_report::ChromeResetReport::RESET_REQUEST_ORIGIN_USER_CLICK);
SendSettingsFeedbackProto(*report_proto, profile_);
+ }
}
}
setting_snapshot_.reset();

Powered by Google App Engine
This is Rietveld 408576698