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

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: Test cleanup 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..12ced6d8fa0ee09f19a56d99ab0c8cc8785acf73 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,12 @@ Polymer({
},
/** @private */
+ resetRequestOrigin_: {
hcarmona 2016/10/13 20:30:19 Please change to: resetRequestOrigin: String, Ha
alito 2016/10/13 21:27:28 Done.
+ type: String,
+ value: '',
+ },
+
+ /** @private */
clearingInProgress_: {
type: Boolean,
value: false,
@@ -86,10 +92,14 @@ 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 {
+ var origin = window.location.hash.slice(1).toLowerCase() == 'cct' ?
hcarmona 2016/10/13 20:30:19 Please add a comment explaining why 'cct' is impor
alito 2016/10/13 21:27:28 Done.
+ '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();

Powered by Google App Engine
This is Rietveld 408576698