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

Side by Side Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 10818031: Alternative GDrive promo for the File Manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some tweaks Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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;
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // Keep this list in sync with the strings in generated_resources.grd and 432 // Keep this list in sync with the strings in generated_resources.grd and
427 // extension_file_browser_private_api.cc! 433 // extension_file_browser_private_api.cc!
428 setTimeout(callback, 0, { 434 setTimeout(callback, 0, {
429 // These two are from locale_settings*.grd 435 // These two are from locale_settings*.grd
430 WEB_FONT_FAMILY: 'Open Sans,Chrome Droid Sans,' + 436 WEB_FONT_FAMILY: 'Open Sans,Chrome Droid Sans,' +
431 'Droid Sans Fallback,sans-serif', 437 'Droid Sans Fallback,sans-serif',
432 WEB_FONT_SIZE: '84%', 438 WEB_FONT_SIZE: '84%',
433 439
434 FILE_IS_DIRECTORY: 'Folder', 440 FILE_IS_DIRECTORY: 'Folder',
435 441
442 CHROMEOS_RELEASE_BOARD: 'stumpy',
443
436 GDATA_DIRECTORY_LABEL: 'Google Drive', 444 GDATA_DIRECTORY_LABEL: 'Google Drive',
437 ENABLE_GDATA: true, 445 ENABLE_GDATA: true,
438 PDF_VIEW_ENABLED: true, 446 PDF_VIEW_ENABLED: true,
439 447
440 ROOT_DIRECTORY_LABEL: 'Files', 448 ROOT_DIRECTORY_LABEL: 'Files',
441 DOWNLOADS_DIRECTORY_LABEL: 'Downloads', 449 DOWNLOADS_DIRECTORY_LABEL: 'Downloads',
442 DOWNLOADS_DIRECTORY_WARNING: "<strong>Caution:</strong> These files are temporary and may be automatically deleted to free up disk space. &lt ;a href='javascript://'>Learn More</a>", 450 DOWNLOADS_DIRECTORY_WARNING: "<strong>Caution:</strong> These files are temporary and may be automatically deleted to free up disk space. &lt ;a href='javascript://'>Learn More</a>",
443 NAME_COLUMN_LABEL: 'Name', 451 NAME_COLUMN_LABEL: 'Name',
444 SIZE_COLUMN_LABEL: 'Size', 452 SIZE_COLUMN_LABEL: 'Size',
445 SIZE_KB: 'KB', 453 SIZE_KB: 'KB',
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 GDATA_BUY_MORE_SPACE: 'Buy more...', 543 GDATA_BUY_MORE_SPACE: 'Buy more...',
536 GDATA_SPACE_AVAILABLE: '$1 left', 544 GDATA_SPACE_AVAILABLE: '$1 left',
537 545
538 OFFLINE_COLUMN_LABEL: 'Available offline', 546 OFFLINE_COLUMN_LABEL: 'Available offline',
539 GDATA_LOADING: 'Hang with us. We\'re fetching your files.', 547 GDATA_LOADING: 'Hang with us. We\'re fetching your files.',
540 GDATA_RETRY: 'Retry', 548 GDATA_RETRY: 'Retry',
541 GDATA_LEARN_MORE: 'Learn more', 549 GDATA_LEARN_MORE: 'Learn more',
542 GDATA_CANNOT_REACH: '$1 cannot be reached at this time', 550 GDATA_CANNOT_REACH: '$1 cannot be reached at this time',
543 551
544 GDATA_WELCOME_TITLE: 'Welcome to Google Drive!', 552 GDATA_WELCOME_TITLE: 'Welcome to Google Drive!',
553 GDATA_WELCOME_TITLE_ALTERNATIVE: 'Get 100 GB free with Google Drive',
545 GDATA_WELCOME_TEXT_SHORT: 554 GDATA_WELCOME_TEXT_SHORT:
546 'All files saved in this folder are backed up online automatically', 555 'All files saved in this folder are backed up online automatically',
547 GDATA_WELCOME_TEXT_LONG: 556 GDATA_WELCOME_TEXT_LONG:
548 '<p><strong>Access files from everywhere, even offline.</strong> ' + 557 '<p><strong>Access files from everywhere, even offline.</strong> ' +
549 'Files in Google Drive are up-to-date and available from any device.</ p>' + 558 'Files in Google Drive are up-to-date and available from any device.</ p>' +
550 '<p><strong>Keep your files safe.</strong> ' + 559 '<p><strong>Keep your files safe.</strong> ' +
551 'No matter what happens to your device, your files are ' + 560 'No matter what happens to your device, your files are ' +
552 'safely stored in Google Drive .</p>' + 561 'safely stored in Google Drive .</p>' +
553 '<p><strong>Share, create and collaborate</strong> ' + 562 '<p><strong>Share, create and collaborate</strong> ' +
554 'on files with others all in one place .</p>', 563 'on files with others all in one place .</p>',
564 GDATA_WELCOME_GET_STARTED: 'Get started',
555 GDATA_WELCOME_DISMISS: 'Dismiss', 565 GDATA_WELCOME_DISMISS: 'Dismiss',
556 GDATA_LOADING_PROGRESS: '$1 files fetched', 566 GDATA_LOADING_PROGRESS: '$1 files fetched',
557 567
558 OFFLINE_HEADER: 'You are offline', 568 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.', 569 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.', 570 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.', 571 HOSTED_OFFLINE_MESSAGE: 'You must be online to access this file.',
562 HOSTED_OFFLINE_MESSAGE_PLURAL: 'You must be online to access these files.' , 572 HOSTED_OFFLINE_MESSAGE_PLURAL: 'You must be online to access these files.' ,
563 573
564 CONFIRM_MOBILE_DATA_USE: 'Fetching this file will use approximately $1 of mobile data.', 574 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
806 compare: function(a, b) { 816 compare: function(a, b) {
807 if (a > b) return 1; 817 if (a > b) return 1;
808 if (a < b) return -1; 818 if (a < b) return -1;
809 return 0; 819 return 0;
810 } 820 }
811 }; 821 };
812 }; 822 };
813 823
814 return v8Intl; 824 return v8Intl;
815 }()); 825 }());
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698