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

Unified Diff: chrome/browser/resources/file_manager/js/path_util.js

Issue 12857002: Files.app: Add subfolders in the left nav (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/path_util.js
diff --git a/chrome/browser/resources/file_manager/js/path_util.js b/chrome/browser/resources/file_manager/js/path_util.js
index fb31fb10038f1ae5559d1b6690d078a4cc03a0c8..afad6691c251975f377eba354e2695cd8bed68d4 100644
--- a/chrome/browser/resources/file_manager/js/path_util.js
+++ b/chrome/browser/resources/file_manager/js/path_util.js
@@ -131,6 +131,18 @@ PathUtil.isRootPath = function(path) {
};
/**
+ * @param {string} path A root path.
+ * @return {boolean} True if the given path is root and user can unmount it.
+ */
+PathUtil.isUnmountableByUser = function(path) {
+ if (!PathUtil.isRootPath(path))
+ return false;
+
+ var type = PathUtil.getRootType(path);
+ return (type == RootType.ARCHIVE || type == RootType.REMOVABLE);
+};
+
+/**
* @param {string} parent_path The parent path.
* @param {string} child_path The child path.
* @return {boolean} True if |parent_path| is parent file path of |child_path|.
« no previous file with comments | « chrome/browser/resources/file_manager/js/main_scripts.js ('k') | chrome/browser/resources/file_manager/js/sidebar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698