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

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

Issue 10310163: Refactoring file manager: moving volume mounting related code to a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 8 years, 7 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 result.fileName.slice(result.fileName.indexOf('.') + 1); 640 result.fileName.slice(result.fileName.indexOf('.') + 1);
641 result.resourceId = 641 result.resourceId =
642 result.fileName.substr(0, result.fileName.indexOf('.')); 642 result.fileName.substr(0, result.fileName.indexOf('.'));
643 643
644 if (result.fileName.length > 0 && result.displayName.length > 0) { 644 if (result.fileName.length > 0 && result.displayName.length > 0) {
645 return result; 645 return result;
646 } else { 646 } else {
647 return null; 647 return null;
648 } 648 }
649 }; 649 };
650
651 /**
652 * Makes filesystem: URL from the path.
653 * @param {string} path File or directory path.
654 * @return {string} URL.
655 */
656 util.makeFilesystemUrl = function(path) {
657 return 'filesystem:' + chrome.extension.getURL('external' + path);
658 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698