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

Unified Diff: chrome/browser/resources/options/reset_profile_settings_overlay.js

Issue 2236663002: Add origin of settings reset request to feedback reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small change in proto enum order. Created 4 years, 3 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/resources/options/reset_profile_settings_overlay.js
diff --git a/chrome/browser/resources/options/reset_profile_settings_overlay.js b/chrome/browser/resources/options/reset_profile_settings_overlay.js
index 74296225bb8560ec6e6fbe224e2234f6832ba6d2..1b0f359d7eaae43285d4d1e96be5f57ac4ee4f52 100644
--- a/chrome/browser/resources/options/reset_profile_settings_overlay.js
+++ b/chrome/browser/resources/options/reset_profile_settings_overlay.js
@@ -53,7 +53,8 @@ cr.define('options', function() {
$('reset-profile-settings-commit').onclick = function(e) {
ResetProfileSettingsOverlay.setResettingState(true);
chrome.send('performResetProfileSettings',
- [$('send-settings').checked]);
+ [$('send-settings').checked,
+ ResetProfileSettingsOverlay.resetRequestOrigin_]);
};
$('expand-feedback').onclick = function(e) {
var feedbackTemplate = $('feedback-template');
@@ -79,6 +80,21 @@ cr.define('options', function() {
'triggeredResetProfileSettingsExplanation' :
'resetProfileSettingsExplanation');
+ // Set ResetProfileSettingsOverlay.resetRequestOrigin_ to indicate where
+ // the reset request came from.
+ //
+ // For the non-triggered reset overlay, a '#userclick' hash indicates that
+ // the reset request came from the user clicking on the reset settings
+ // button and is set by the browser_options page. A '#cct' hash indicates
+ // that the reset request came from the CCT by launching Chrome with the
+ // startup URL chrome://settings/resetProfileSettings#cct.
+ var hash = this.hash.slice(1).toLowerCase();
Dan Beam 2016/09/16 06:29:41 do we need this hash variable if this.isTriggered_
alito 2016/09/16 17:10:18 Made the triggered case simpler.
+ ResetProfileSettingsOverlay.resetRequestOrigin_ =
+ this.isTriggered_ ?
+ 'triggeredreset' :
+ (hash === 'cct' || hash === 'userclick' ? hash : '');
+ this.setHash('');
+
chrome.send('onShowResetProfileDialog');
},

Powered by Google App Engine
This is Rietveld 408576698