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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js

Issue 148193002: Removed most of path utility functions in Files app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 11 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
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/folder_shortcuts_data_model.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js b/chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js
index 258296f15e6884d0155526aff7e74726210d8fbe..9a4ad9661d93223bbcae2cd2594198ecc7bebe8d 100644
--- a/chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js
+++ b/chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js
@@ -259,7 +259,13 @@ VolumeManagerWrapper.prototype.getDefaultDisplayRoot =
* @return {EntryLocation} Location information.
*/
VolumeManagerWrapper.prototype.getLocationInfo = function(entry) {
- return this.volumeManager_ && this.volumeManager_.getLocationInfo(entry);
+ var locationInfo =
+ this.volumeManager_ && this.volumeManager_.getLocationInfo(entry);
+ if (!locationInfo)
+ return null;
+ if (!this.filterDisabledDriveVolume_(locationInfo.volumeInfo))
+ return null;
+ return locationInfo;
};
/**
@@ -300,31 +306,6 @@ VolumeManagerWrapper.prototype.unmount = function(
};
/**
- * Resolves the absolute path to an entry instance.
- * @param {string} path The path to be resolved.
- * @param {function(Entry)} successCallback Called with the resolved entry
- * on success.
- * @param {function(FileError)} errorCallback Called with the error on error.
- */
-VolumeManagerWrapper.prototype.resolveAbsolutePath = function(
- path, successCallback, errorCallback) {
- if (this.pendingTasks_) {
- this.pendingTasks_.push(this.resolveAbsolutePath.bind(
- this, path, successCallback, errorCallback));
- return;
- }
-
- // If the drive is disabled, any resolving the path under drive should be
- // failed.
- if (!this.driveEnabled_ && PathUtil.isDriveBasedPath(path)) {
- errorCallback(util.createDOMError(util.FileError.NOT_FOUND_ERR));
- return;
- }
-
- this.volumeManager_.resolveAbsolutePath(path, successCallback, errorCallback);
-};
-
-/**
* Filters volume info by referring driveEnabled.
*
* @param {VolumeInfo} volumeInfo Volume info.
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/folder_shortcuts_data_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698