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

Unified Diff: chrome/browser/resources/file_manager/background/js/file_operation_manager.js

Issue 130353002: Remove the last occurence of fullPath from file_operation_manager.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | 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/background/js/file_operation_manager.js
diff --git a/chrome/browser/resources/file_manager/background/js/file_operation_manager.js b/chrome/browser/resources/file_manager/background/js/file_operation_manager.js
index e305867552f8447ae0a6990990e3f805c4241b64..add481a520b921ae65cf9279310bc5199b989bef 100644
--- a/chrome/browser/resources/file_manager/background/js/file_operation_manager.js
+++ b/chrome/browser/resources/file_manager/background/js/file_operation_manager.js
@@ -1172,11 +1172,12 @@ FileOperationManager.prototype.paste = function(
*/
FileOperationManager.prototype.isMovable = function(
sourceEntry, targetDirEntry) {
- // TODO(mtomasz): Use the volume manager instead of full paths.
- return (PathUtil.isDriveBasedPath(sourceEntry.fullPath) &&
- PathUtil.isDriveBasedPath(targetDirEntry.fullPath)) ||
- (PathUtil.getRootPath(sourceEntry.fullPath) ==
- PathUtil.getRootPath(targetDirEntry.fullPath));
+ var sourceLocationInfo = this.volumeManager_.getLocationInfo(sourceEntry);
+ var targetDirLocationInfo = this.volumeManager_.getLocationInfo(
+ targetDirEntry);
+
+ return sourceLocationInfo && targetDirLocationInfo &&
+ sourceLocationInfo.volumeInfo === targetDirLocationInfo.volumeInfo;
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698