Chromium Code Reviews| 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'); |
| }, |