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

Side by Side Diff: chrome/browser/resources/sync_internals/data.js

Issue 138563003: Datadump on sync_internals output REDACTED instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 var dumpToTextButton = $('dump-to-text'); 6 var dumpToTextButton = $('dump-to-text');
7 var dataDump = $('data-dump'); 7 var dataDump = $('data-dump');
8 dumpToTextButton.addEventListener('click', function(event) { 8 dumpToTextButton.addEventListener('click', function(event) {
9 // TODO(akalin): Add info like Chrome version, OS, date dumped, etc. 9 // TODO(akalin): Add info like Chrome version, OS, date dumped, etc.
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 function getFields(node) { 60 function getFields(node) {
61 return allFields.map(function(field) { 61 return allFields.map(function(field) {
62 var fieldVal; 62 var fieldVal;
63 if (field == 'SERVER_VERSION_TIME') { 63 if (field == 'SERVER_VERSION_TIME') {
64 var version = node['SERVER_VERSION']; 64 var version = node['SERVER_VERSION'];
65 fieldVal = versionToDateString(version); 65 fieldVal = versionToDateString(version);
66 } if (field == 'BASE_VERSION_TIME') { 66 } if (field == 'BASE_VERSION_TIME') {
67 var version = node['BASE_VERSION']; 67 var version = node['BASE_VERSION'];
68 fieldVal = versionToDateString(version); 68 fieldVal = versionToDateString(version);
69 } else if ((field == 'SERVER_SPECIFICS' || field == 'SPECIFICS') && 69 } else if ((field == 'SERVER_SPECIFICS' || field == 'SPECIFICS') &&
70 (!$('include-specifics').checked)) {
71 fieldVal = 'REDACTED';
72 } else if ((field == 'SERVER_SPECIFICS' || field == 'SPECIFICS') &&
70 $('include-specifics').checked) { 73 $('include-specifics').checked) {
71 fieldVal = JSON.stringify(node[field]); 74 fieldVal = JSON.stringify(node[field]);
72 } else { 75 } else {
73 fieldVal = node[field]; 76 fieldVal = node[field];
74 } 77 }
75 return fieldVal; 78 return fieldVal;
76 }); 79 });
77 } 80 }
78 81
79 function isSelectedDatatype(node) { 82 function isSelectedDatatype(node) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 chrome.sync.getNodeSummariesById(childNodeIds, populateDatatypes); 178 chrome.sync.getNodeSummariesById(childNodeIds, populateDatatypes);
176 }); 179 });
177 }); 180 });
178 }); 181 });
179 182
180 var dumpToFileLink = $('dump-to-file'); 183 var dumpToFileLink = $('dump-to-file');
181 dumpToFileLink.addEventListener('click', function(event) { 184 dumpToFileLink.addEventListener('click', function(event) {
182 chrome.sync.getAllNodes(triggerDataDownload); 185 chrome.sync.getAllNodes(triggerDataDownload);
183 }); 186 });
184 })(); 187 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698