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

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

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox Created 5 years, 10 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 function makeDateUserAgentHeader() { 119 function makeDateUserAgentHeader() {
120 var now = new Date(); 120 var now = new Date();
121 var userAgent = window.navigator.userAgent; 121 var userAgent = window.navigator.userAgent;
122 var dateUaHeader = [now.toISOString(), userAgent].join(','); 122 var dateUaHeader = [now.toISOString(), userAgent].join(',');
123 return dateUaHeader; 123 return dateUaHeader;
124 } 124 }
125 125
126 /** 126 /**
127 * Builds a summary of current state and exports it as a downloaded file. 127 * Builds a summary of current state and exports it as a downloaded file.
128 * 128 *
129 * @param {!Array.<{type: string, nodes: !Array<!Object>}>} nodesMap 129 * @param {!Array<{type: string, nodes: !Array<!Object>}>} nodesMap
130 * Summary of local state by model type. 130 * Summary of local state by model type.
131 */ 131 */
132 function triggerDataDownload(nodesMap) { 132 function triggerDataDownload(nodesMap) {
133 // Prepend a header with ISO date and useragent. 133 // Prepend a header with ISO date and useragent.
134 var output = [makeDateUserAgentHeader()]; 134 var output = [makeDateUserAgentHeader()];
135 output.push('====='); 135 output.push('=====');
136 136
137 var aboutInfo = JSON.stringify(chrome.sync.aboutInfo, null, 2); 137 var aboutInfo = JSON.stringify(chrome.sync.aboutInfo, null, 2);
138 output.push(aboutInfo); 138 output.push(aboutInfo);
139 139
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 'onReceivedListOfTypes', 192 'onReceivedListOfTypes',
193 onReceivedListOfTypes); 193 onReceivedListOfTypes);
194 chrome.sync.requestListOfTypes(); 194 chrome.sync.requestListOfTypes();
195 }); 195 });
196 196
197 var dumpToFileLink = $('dump-to-file'); 197 var dumpToFileLink = $('dump-to-file');
198 dumpToFileLink.addEventListener('click', function(event) { 198 dumpToFileLink.addEventListener('click', function(event) {
199 chrome.sync.getAllNodes(triggerDataDownload); 199 chrome.sync.getAllNodes(triggerDataDownload);
200 }); 200 });
201 })(); 201 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/sync_file_system_internals/utils.js ('k') | chrome/browser/resources/uber/uber.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698