OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MockEventSource() { | 5 function MockEventSource() { |
6 this.listeners_ = []; | 6 this.listeners_ = []; |
7 } | 7 } |
8 | 8 |
9 /** | 9 /** |
10 * Add a listener. | 10 * Add a listener. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
314 webkitResolveLocalFileSystemURL(sourceUrl, function(entry) { | 314 webkitResolveLocalFileSystemURL(sourceUrl, function(entry) { |
315 util.removeFileOrDirectory( | 315 util.removeFileOrDirectory( |
316 entry, | 316 entry, |
317 util.flog('Deleted a mock mount at ' + entry.fullPath, | 317 util.flog('Deleted a mock mount at ' + entry.fullPath, |
318 notify.bind(null, 'success'), | 318 notify.bind(null, 'success'), |
319 util.flog('Error deleting a mock mount at' + entry.fullPath, | 319 util.flog('Error deleting a mock mount at' + entry.fullPath, |
320 notify))); | 320 notify))); |
321 }); | 321 }); |
322 }, | 322 }, |
323 | 323 |
324 getSizeStats: function() {}, | 324 getSizeStats: function(url, callback) { |
325 var kB_inGb = 1024 * 1024; | |
Dmitry Zvorygin
2012/07/25 15:15:46
Consider using util.SCALE.
| |
326 callback({ | |
327 remainingSizeKB: 9 * kB_inGb, | |
328 totalSizeKB: 10 * kB_inGb | |
329 }); | |
330 }, | |
325 | 331 |
326 getVolumeMetadata: function(url, callback) { | 332 getVolumeMetadata: function(url, callback) { |
327 var metadata = {}; | 333 var metadata = {}; |
328 var urlLocalPath = chrome.fileBrowserPrivate.fileUrlToLocalPath_(url); | 334 var urlLocalPath = chrome.fileBrowserPrivate.fileUrlToLocalPath_(url); |
329 function urlStartsWith(path) { | 335 function urlStartsWith(path) { |
330 return urlLocalPath && urlLocalPath.indexOf(path) == 0; | 336 return urlLocalPath && urlLocalPath.indexOf(path) == 0; |
331 } | 337 } |
332 if (urlStartsWith('/removable')) { | 338 if (urlStartsWith('/removable')) { |
333 metadata.deviceType = urlLocalPath.split('-').pop(); | 339 metadata.deviceType = urlLocalPath.split('-').pop(); |
334 if (urlLocalPath.indexOf('readonly') != -1) { | 340 if (urlLocalPath.indexOf('readonly') != -1) { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 GDATA_BUY_MORE_SPACE: 'Buy more...', | 541 GDATA_BUY_MORE_SPACE: 'Buy more...', |
536 GDATA_SPACE_AVAILABLE: '$1 left', | 542 GDATA_SPACE_AVAILABLE: '$1 left', |
537 | 543 |
538 OFFLINE_COLUMN_LABEL: 'Available offline', | 544 OFFLINE_COLUMN_LABEL: 'Available offline', |
539 GDATA_LOADING: 'Hang with us. We\'re fetching your files.', | 545 GDATA_LOADING: 'Hang with us. We\'re fetching your files.', |
540 GDATA_RETRY: 'Retry', | 546 GDATA_RETRY: 'Retry', |
541 GDATA_LEARN_MORE: 'Learn more', | 547 GDATA_LEARN_MORE: 'Learn more', |
542 GDATA_CANNOT_REACH: '$1 cannot be reached at this time', | 548 GDATA_CANNOT_REACH: '$1 cannot be reached at this time', |
543 | 549 |
544 GDATA_WELCOME_TITLE: 'Welcome to Google Drive!', | 550 GDATA_WELCOME_TITLE: 'Welcome to Google Drive!', |
551 GDATA_WELCOME_TITLE_ALTERNATIVE: 'Get 100 GB free with Google Drive', | |
545 GDATA_WELCOME_TEXT_SHORT: | 552 GDATA_WELCOME_TEXT_SHORT: |
546 'All files saved in this folder are backed up online automatically', | 553 'All files saved in this folder are backed up online automatically', |
547 GDATA_WELCOME_TEXT_LONG: | 554 GDATA_WELCOME_TEXT_LONG: |
548 '<p><strong>Access files from everywhere, even offline.</strong> ' + | 555 '<p><strong>Access files from everywhere, even offline.</strong> ' + |
549 'Files in Google Drive are up-to-date and available from any device.</ p>' + | 556 'Files in Google Drive are up-to-date and available from any device.</ p>' + |
550 '<p><strong>Keep your files safe.</strong> ' + | 557 '<p><strong>Keep your files safe.</strong> ' + |
551 'No matter what happens to your device, your files are ' + | 558 'No matter what happens to your device, your files are ' + |
552 'safely stored in Google Drive .</p>' + | 559 'safely stored in Google Drive .</p>' + |
553 '<p><strong>Share, create and collaborate</strong> ' + | 560 '<p><strong>Share, create and collaborate</strong> ' + |
554 'on files with others all in one place .</p>', | 561 'on files with others all in one place .</p>', |
562 GDATA_WELCOME_GET_STARTED: 'Get started', | |
555 GDATA_WELCOME_DISMISS: 'Dismiss', | 563 GDATA_WELCOME_DISMISS: 'Dismiss', |
556 GDATA_LOADING_PROGRESS: '$1 files fetched', | 564 GDATA_LOADING_PROGRESS: '$1 files fetched', |
557 | 565 |
558 OFFLINE_HEADER: 'You are offline', | 566 OFFLINE_HEADER: 'You are offline', |
559 OFFLINE_MESSAGE: 'To save this file for offline use, get back online and<b r>select the \'$1\' checkbox for this file.', | 567 OFFLINE_MESSAGE: 'To save this file for offline use, get back online and<b r>select the \'$1\' checkbox for this file.', |
560 OFFLINE_MESSAGE_PLURAL: 'To save these files for offline use, get back onl ine and<br>select the \'$1\' checkbox for this file.', | 568 OFFLINE_MESSAGE_PLURAL: 'To save these files for offline use, get back onl ine and<br>select the \'$1\' checkbox for this file.', |
561 HOSTED_OFFLINE_MESSAGE: 'You must be online to access this file.', | 569 HOSTED_OFFLINE_MESSAGE: 'You must be online to access this file.', |
562 HOSTED_OFFLINE_MESSAGE_PLURAL: 'You must be online to access these files.' , | 570 HOSTED_OFFLINE_MESSAGE_PLURAL: 'You must be online to access these files.' , |
563 | 571 |
564 CONFIRM_MOBILE_DATA_USE: 'Fetching this file will use approximately $1 of mobile data.', | 572 CONFIRM_MOBILE_DATA_USE: 'Fetching this file will use approximately $1 of mobile data.', |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 compare: function(a, b) { | 814 compare: function(a, b) { |
807 if (a > b) return 1; | 815 if (a > b) return 1; |
808 if (a < b) return -1; | 816 if (a < b) return -1; |
809 return 0; | 817 return 0; |
810 } | 818 } |
811 }; | 819 }; |
812 }; | 820 }; |
813 | 821 |
814 return v8Intl; | 822 return v8Intl; |
815 }()); | 823 }()); |
OLD | NEW |