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

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: addressed comments 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..98bd228e23b642e2c69eacb496783da3ec4ffd64 100644
--- a/chrome/browser/resources/file_manager/js/path_util.js
+++ b/chrome/browser/resources/file_manager/js/path_util.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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|.

Powered by Google App Engine
This is Rietveld 408576698