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

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

Issue 13149003: drive: Use "/drive/root" namespace and fix Files app and tests. (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 42bbc0436f2ff550f20374acb6accdd27f84fdc4..38378921889a4dadf129b8069fb0a7b1df083b99 100644
--- a/chrome/browser/resources/file_manager/js/path_util.js
+++ b/chrome/browser/resources/file_manager/js/path_util.js
@@ -133,11 +133,11 @@ PathUtil.getRootPath = function(path) {
var type = PathUtil.getRootType(path);
// TODO(haruki): Add support for "drive/root" and "drive/other".
- if (type == RootType.DOWNLOADS || type == RootType.DRIVE ||
- type == RootType.DRIVE_OFFLINE || type == RootType.DRIVE_SHARED_WITH_ME)
+ if (type == RootType.DOWNLOADS || type == RootType.DRIVE_OFFLINE ||
+ type == RootType.DRIVE_SHARED_WITH_ME)
return PathUtil.getTopDirectory(path);
- if (type == RootType.ARCHIVE ||
+ if (type == RootType.DRIVE || type == RootType.ARCHIVE ||
type == RootType.REMOVABLE) {
var components = PathUtil.split(path);
if (components.length > 1) {
@@ -213,7 +213,7 @@ PathUtil.getRootLabel = function(path) {
return path.substring(RootDirectory.REMOVABLE.length + 1);
// TODO(haruki): Add support for "drive/root" and "drive/other".
- if (path === RootDirectory.DRIVE)
+ if (path === RootDirectory.DRIVE + '/' + DriveSubRootDirectory.ROOT)
return str('DRIVE_DIRECTORY_LABEL');
if (path === RootDirectory.DRIVE_OFFLINE)

Powered by Google App Engine
This is Rietveld 408576698