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

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

Issue 98543002: file_manager: Allow renaming of Drive files even when offline (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/foreground/js/file_manager_commands.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js b/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
index 41e007852c420378a214ed69fa56011348e1bb15..32a3c843e9fe88fbf3eb0f7e3758de49fea78357 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
@@ -533,10 +533,12 @@ CommandHandler.COMMANDS_['rename'] = {
fileManager.initiateRename();
},
canExecute: function(event, fileManager) {
+ var allowRenamingWhileOffline =
+ fileManager.directoryModel.getCurrentRootType() === RootType.DRIVE;
var selection = fileManager.getSelection();
event.canExecute =
!fileManager.isRenamingInProgress() &&
- !fileManager.isOnReadonlyDirectory() &&
+ (!fileManager.isOnReadonlyDirectory() || allowRenamingWhileOffline) &&
selection &&
selection.totalCount == 1;
}
« 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