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

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

Issue 121203002: Use window.URL instead of window.webkitURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: window.URL -> URL in user_images_grid.js 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Some types, such as 'Top level folder', appear in the list of nodes 82 // Some types, such as 'Top level folder', appear in the list of nodes
83 // but not in the list of selectable items. 83 // but not in the list of selectable items.
84 if (typeCheckbox == null) { 84 if (typeCheckbox == null) {
85 return false; 85 return false;
86 } 86 }
87 return typeCheckbox.checked; 87 return typeCheckbox.checked;
88 } 88 }
89 89
90 function makeBlobUrl(data) { 90 function makeBlobUrl(data) {
91 var textBlob = new Blob([data], {type: 'octet/stream'}); 91 var textBlob = new Blob([data], {type: 'octet/stream'});
92 var blobUrl = window.webkitURL.createObjectURL(textBlob); 92 var blobUrl = window.URL.createObjectURL(textBlob);
93 return blobUrl; 93 return blobUrl;
94 } 94 }
95 95
96 function makeDownloadName() { 96 function makeDownloadName() {
97 // Format is sync-data-dump-$epoch-$year-$month-$day-$OS.csv. 97 // Format is sync-data-dump-$epoch-$year-$month-$day-$OS.csv.
98 var now = new Date(); 98 var now = new Date();
99 var friendlyDate = [now.getFullYear(), 99 var friendlyDate = [now.getFullYear(),
100 now.getMonth() + 1, 100 now.getMonth() + 1,
101 now.getDate()].join('-'); 101 now.getDate()].join('-');
102 var name = ['sync-data-dump', 102 var name = ['sync-data-dump',
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 chrome.sync.getNodeSummariesById(childNodeIds, populateDatatypes); 175 chrome.sync.getNodeSummariesById(childNodeIds, populateDatatypes);
176 }); 176 });
177 }); 177 });
178 }); 178 });
179 179
180 var dumpToFileLink = $('dump-to-file'); 180 var dumpToFileLink = $('dump-to-file');
181 dumpToFileLink.addEventListener('click', function(event) { 181 dumpToFileLink.addEventListener('click', function(event) {
182 chrome.sync.getAllNodes(triggerDataDownload); 182 chrome.sync.getAllNodes(triggerDataDownload);
183 }); 183 });
184 })(); 184 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/profiler/profiler.js ('k') | chrome/browser/resources/translate_internals/translate_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698