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

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: Addressed Dan's comments, take 2 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/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 7da9e29642459e099cd8debd5830e9bf03aed3f9..b82592b6a34cc852f843aa27a720d15031b1f7f3 100644
--- a/chrome/browser/resources/options/reset_profile_settings_overlay.js
+++ b/chrome/browser/resources/options/reset_profile_settings_overlay.js
@@ -25,6 +25,9 @@ cr.define('options', function() {
// Inherit ResetProfileSettingsOverlay from Page.
__proto__: Page.prototype,
+ /** @private {string} */
Dan Beam 2016/09/06 19:35:18 this should be protected
Dan Beam 2016/09/13 18:42:09 do this
alito 2016/09/16 02:10:37 resetRequestOrigin_ is now a static variable.
+ resetRequestOrigin_: '',
+
/** @override */
initializePage: function() {
Page.prototype.initializePage.call(this);
@@ -35,7 +38,9 @@ cr.define('options', function() {
$('reset-profile-settings-commit').onclick = function(e) {
ResetProfileSettingsOverlay.setResettingState(true);
chrome.send('performResetProfileSettings',
- [$('send-settings').checked]);
+ [$('send-settings').checked,
+ ResetProfileSettingsOverlay.getInstance()
Dan Beam 2016/09/06 19:35:18 if ResetProfileSettingsOverlay.getInstance() != th
alito 2016/09/13 02:02:00 The reason that ResetProfileSettingsOverlay.getIns
Dan Beam 2016/09/13 18:42:09 tl;dr
+ .resetRequestOrigin_]);
Dan Beam 2016/09/06 19:35:18 this.resetRequestOrigin_
Dan Beam 2016/09/13 18:42:09 do this
alito 2016/09/16 02:10:37 resetRequestOrigin_ is now a static variable.
};
Dan Beam 2016/09/06 19:35:18 }.bind(this);
Dan Beam 2016/09/13 18:42:09 do this
alito 2016/09/16 02:10:37 No longer needed.
$('expand-feedback').onclick = function(e) {
var feedbackTemplate = $('feedback-template');
@@ -51,6 +56,18 @@ cr.define('options', function() {
* chrome/browser/resources/options/automatic_settings_reset_banner.js.
*/
didShowPage: function() {
+ // A '#userclick' hash indicates that the reset request came from the
+ // user clicking on the reset settings button. This hash 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();
+ this.resetRequestOrigin_ =
+ hash == 'cct' || hash == 'userclick' ? hash : '';
+ this.setHash('');
+
$('reset-profile-settings-title').textContent =
loadTimeData.getString('resetProfileSettingsOverlay');
$('reset-profile-settings-explanation').textContent =

Powered by Google App Engine
This is Rietveld 408576698