Chromium Code Reviews| Index: chrome/browser/resources/file_manager/js/directory_model.js |
| diff --git a/chrome/browser/resources/file_manager/js/directory_model.js b/chrome/browser/resources/file_manager/js/directory_model.js |
| index c41990ffd07093caadb4c101fa437ab43d4be1d6..40be8dfcca6caea3fc7bc0173f48a40a3333e241 100644 |
| --- a/chrome/browser/resources/file_manager/js/directory_model.js |
| +++ b/chrome/browser/resources/file_manager/js/directory_model.js |
| @@ -57,7 +57,7 @@ function DirectoryModel(root, singleSelection, |
| /** |
| * Fake entry to be used in currentDirEntry_ when current directory is |
| - * unmounted DRIVE. |
| + * unmounted DRIVE. TODO(haruki): Support "drive/root" and "drive/other". |
| * @private |
| */ |
| DirectoryModel.fakeDriveEntry_ = { |
| @@ -65,6 +65,7 @@ DirectoryModel.fakeDriveEntry_ = { |
| isDirectory: true |
| }; |
| + |
|
yoshiki
2013/03/15 06:26:58
nit: remove
Haruki Sato
2013/03/15 06:49:47
Done. Thanks.
|
| /** |
| * Fake entry representing a psuedo directory, which contains Drive files |
| * available offline. This entry works as a trigger to start a search using |
| @@ -1095,7 +1096,7 @@ DirectoryModel.prototype.resolveRoots_ = function(callback) { |
| if (this.driveEnabled_) { |
| var fake = [DirectoryModel.fakeDriveEntry_]; |
| if (this.isDriveMounted()) { |
| - readSingle(RootDirectory.DRIVE.substring(1), 'drive', fake); |
| + readSingle(DirectoryModel.fakeDriveEntry_.fullPath, 'drive', fake); |
| } else { |
| groups.drive = fake; |
| } |
| @@ -1184,8 +1185,10 @@ DirectoryModel.prototype.onDriveStatusChanged_ = function() { |
| this.getDriveOfflineFiles(''); |
| } |
| } |
| - this.root_.getDirectory(RootDirectory.DRIVE, {}, |
| - onGotDirectory.bind(this)); |
| + this.root_.getDirectory( |
| + DirectoryModel.fakeDriveEntry_.fullPath, {}, |
| + onGotDirectory.bind(this)); |
| + // TODO(haruki): support "other" root. |
| } else { |
| var rootType = this.getCurrentRootType(); |
| if (rootType != RootType.DRIVE && rootType != RootType.DRIVE_OFFLINE) |