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

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

Issue 10914075: [filemanager] Implementing undo delete functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 /** 5 /**
6 * Namespace for utility functions. 6 * Namespace for utility functions.
7 */ 7 */
8 var util = {}; 8 var util = {};
9 9
10 /** 10 /**
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 'rotate(' + transform.rotate90 * 90 + 'deg)' : 576 'rotate(' + transform.rotate90 * 90 + 'deg)' :
577 ''; 577 '';
578 }; 578 };
579 579
580 /** 580 /**
581 * Makes filesystem: URL from the path. 581 * Makes filesystem: URL from the path.
582 * @param {string} path File or directory path. 582 * @param {string} path File or directory path.
583 * @return {string} URL. 583 * @return {string} URL.
584 */ 584 */
585 util.makeFilesystemUrl = function(path) { 585 util.makeFilesystemUrl = function(path) {
586 path = path.split('/').map(encodeURIComponent).join('/');
586 return 'filesystem:' + chrome.extension.getURL('external' + path); 587 return 'filesystem:' + chrome.extension.getURL('external' + path);
587 }; 588 };
588 589
589 /** 590 /**
590 * Extracts path from filesystem: URL. 591 * Extracts path from filesystem: URL.
591 * @param {string} url Filesystem URL. 592 * @param {string} url Filesystem URL.
592 * @return {string} The path. 593 * @return {string} The path.
593 */ 594 */
594 util.extractFilePath = function(url) { 595 util.extractFilePath = function(url) {
595 var path = /^filesystem:[\w-]*:\/\/[\w]*\/(external|persistent)(\/.*)$/. 596 var path = /^filesystem:[\w-]*:\/\/[\w]*\/(external|persistent)(\/.*)$/.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 * Wrapper function to make dealing with translated strings more concise. 684 * Wrapper function to make dealing with translated strings more concise.
684 * Equivilant to loadTimeData.getStringF(id, ...). 685 * Equivilant to loadTimeData.getStringF(id, ...).
685 * 686 *
686 * @param {string} id The id of the string to return. 687 * @param {string} id The id of the string to return.
687 * @param {...string} var_args The values to replace into the string. 688 * @param {...string} var_args The values to replace into the string.
688 * @return {string} The translated string with replaced values. 689 * @return {string} The translated string with replaced values.
689 */ 690 */
690 function strf(id, var_args) { 691 function strf(id, var_args) {
691 return loadTimeData.getStringF.apply(loadTimeData, arguments); 692 return loadTimeData.getStringF.apply(loadTimeData, arguments);
692 } 693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698