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

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

Issue 1911573003: MD Settings: Reset profile dialog, display settings in new tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 8 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 2d57d12fbc26271870c6491a1709f619d9f7a205..b4ee147dad81305fd0aaa696a72007d92a419d5c 100644
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
@@ -12,10 +12,6 @@ Polymer({
behaviors: [WebUIListenerBehavior],
- properties: {
- feedbackInfo_: String,
- },
-
/** @private {!settings.ResetBrowserProxy} */
browserProxy_: null,
@@ -26,10 +22,6 @@ Polymer({
this.addEventListener('iron-overlay-canceled', function() {
this.browserProxy_.onHideResetProfileDialog();
}.bind(this));
-
- this.addWebUIListener('feedback-info-changed', function(feedbackInfo) {
- this.feedbackInfo_ = feedbackInfo;
- }.bind(this));
},
open: function() {
@@ -53,11 +45,24 @@ Polymer({
}.bind(this));
},
- /** @private */
- onSendSettingsChange_: function() {
- // TODO(dpapad): Update how settings info is surfaced when final mocks
- // exist.
- this.$.settings.hidden = !this.$.sendSettings.checked;
- this.$.dialog.center();
+ /**
+ * Displays the settings that will be reported in a new tab.
+ * @private
+ */
+ onShowReportedSettingsTap_: function() {
+ this.browserProxy_.getReportedSettings().then(function(settings) {
+ var feedbackObj = {};
+ settings.forEach(function(entry) {
+ // Break strings with '\n' characters into arrays to make the settings a
+ // bit more readable.
+ var values = entry.value.split('\n');
+ feedbackObj[entry.key] = values.length == 1 ? values[0] : values;
+ });
+ var win = window.open('about:blank');
+ var div = win.document.createElement('div');
+ div.textContent = JSON.stringify(feedbackObj, null, 2 /* spaces */);
+ div.style.whiteSpace = 'pre';
+ win.document.body.appendChild(div);
+ });
},
});

Powered by Google App Engine
This is Rietveld 408576698