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

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

Issue 1911943002: MD Settings: Tweak "View reported settings" UI in reset settings profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 b4ee147dad81305fd0aaa696a72007d92a419d5c..20a15a6ecfa6bf277e072d62ac8b329247f82f3c 100644
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
@@ -51,16 +51,12 @@ Polymer({
*/
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 output = settings.map(function(entry) {
+ return entry.key + ': ' + entry.value.replace(/\n/g, ', ');
dschuyler 2016/04/23 00:57:34 Could the line endings contain \r as well (e.g. on
dpapad 2016/04/23 01:18:13 This data comes from https://code.google.com/p/chr
});
var win = window.open('about:blank');
var div = win.document.createElement('div');
- div.textContent = JSON.stringify(feedbackObj, null, 2 /* spaces */);
+ div.textContent = output.join('\n');
div.style.whiteSpace = 'pre';
win.document.body.appendChild(div);
});

Powered by Google App Engine
This is Rietveld 408576698