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

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

Issue 12716015: filemanager: Files App change necessary to use "drive/root". It still works with "drive". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments. 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/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index b8f62c1dbd0d6ae5bd95c10d7ec3a4ccac5aeb2d..c176f05b40c8a2b783c98f302b6057c585d78931 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1315,8 +1315,7 @@ DialogType.isModal = function(type) {
this.finishSetupCurrentDirectory_(path, invokeHandlers);
return;
}
- var drivePath = RootDirectory.DRIVE;
- if (this.volumeManager_.isMounted(drivePath)) {
+ if (this.volumeManager_.isMounted(RootDirectory.DRIVE)) {
this.finishSetupCurrentDirectory_(path, invokeHandlers);
return;
}
@@ -1324,7 +1323,7 @@ DialogType.isModal = function(type) {
this.delayShow_(500);
// Reflect immediatelly in the UI we are on Drive and display
// mounting UI.
- this.directoryModel_.setupPath(drivePath);
+ this.directoryModel_.setupPath(RootDirectory.DRIVE);
if (!this.isOnDrive()) {
// Since DRIVE is not mounted it should be resolved synchronously
@@ -2099,8 +2098,8 @@ DialogType.isModal = function(type) {
util.updateAppState(event.initial, this.getCurrentDirectory());
if (this.closeOnUnmount_ && !event.initial &&
- PathUtil.getRootPath(event.previousDirEntry.fullPath) !=
- PathUtil.getRootPath(event.newDirEntry.fullPath)) {
+ PathUtil.getRootPath(event.previousDirEntry.fullPath) !=
+ PathUtil.getRootPath(event.newDirEntry.fullPath)) {
this.closeOnUnmount_ = false;
}
@@ -2109,9 +2108,11 @@ DialogType.isModal = function(type) {
this.updateGearMenu_();
};
+ // TODO(haruki): Rename this method. "Drive" here does not refer
+ // "Google Drive".
FileManager.prototype.updateUnformattedDriveStatus_ = function() {
var volumeInfo = this.volumeManager_.getVolumeInfo_(
- this.directoryModel_.getCurrentRootPath());
+ PathUtil.getRootPath(this.directoryModel_.getCurrentRootPath()));
if (volumeInfo.error) {
this.dialogDom_.setAttribute('unformatted', '');
« no previous file with comments | « chrome/browser/resources/file_manager/js/drive_banners.js ('k') | chrome/browser/resources/file_manager/js/path_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698