Chromium Code Reviews| 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..63a332bb940131fc3f8a4eb4302cf47601c89021 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,22 @@ 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) { |
|
tommycli
2016/04/20 23:23:18
Maybe add a comment that says something like: Repl
dpapad
2016/04/21 00:27:10
Added comment.
|
| + 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'; |
|
tommycli
2016/04/20 23:23:18
Optional: Since you are styling it, should we just
dpapad
2016/04/21 00:27:10
Does it not already line up (see http://i.imgur.co
|
| + win.document.body.appendChild(div); |
| + }); |
| }, |
| }); |