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

Unified Diff: chrome/browser/resources/settings/reset_page/reset_profile_dialog.js

Issue 2411383003: md-settings: add reset request origin to reset feedback proto. (Closed)
Patch Set: Addressed dbeam@'s comments Created 4 years, 2 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/settings/reset_page/reset_profile_dialog.js
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
index 4161d2905487f18fe24806bc8dc29a1f7847c282..5e89ad531d5ae8e4f2b88d9e7e87f66288436eb8 100644
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
@@ -32,6 +32,9 @@ Polymer({
},
/** @private */
+ resetRequestOrigin_: String,
+
+ /** @private */
clearingInProgress_: {
type: Boolean,
value: false,
@@ -86,10 +89,17 @@ Polymer({
settings.getCurrentRoute() == settings.Route.TRIGGERED_RESET_DIALOG;
if (this.isTriggered_) {
this.browserProxy_.getTriggeredResetToolName().then(function(name) {
+ this.resetRequestOrigin_ = 'triggeredreset';
this.triggeredResetToolName_ = name;
this.showDialog_();
}.bind(this));
} else {
+ // For the non-triggered reset dialog, a '#cct' hash indicates that the
+ // reset request came from the Chrome Cleanup Tool by launching Chrome
+ // with the startup URL chrome://settings/resetProfileSettings#cct.
+ var origin = window.location.hash.slice(1).toLowerCase() == 'cct' ?
+ 'cct' : settings.getQueryParameters().get('origin');
+ this.resetRequestOrigin_ = origin || '';
this.showDialog_();
}
},
@@ -103,7 +113,7 @@ Polymer({
onResetTap_: function() {
this.clearingInProgress_ = true;
this.browserProxy_.performResetProfileSettings(
- this.$.sendSettings.checked).then(function() {
+ this.$.sendSettings.checked, this.resetRequestOrigin_).then(function() {
this.clearingInProgress_ = false;
if (this.$.dialog.open)
this.$.dialog.close();
« no previous file with comments | « chrome/browser/resources/settings/reset_page/reset_page.js ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698