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 f9280a94beaf4e2d58ce773bea86b045cead4c35..a3144a9779f62ce2649a44fc8f52f0e6a253d13d 100644 |
--- a/chrome/browser/resources/file_manager/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/js/file_manager.js |
@@ -2018,9 +2018,17 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52; |
}; |
FileManager.prototype.isDriveEnabled = function() { |
- // TODO(kinaba): Remove the "!shouldReturnLocalPath &&" condition once |
- // crbug.com/140425 is done. |
- return !this.params_.shouldReturnLocalPath && |
+ // Auto resolving to local path does not work for folders (e.g., dialog for |
+ // loading unpacked extensions) and saving. |
+ // TODO(kinaba): remove it from the save dialog http://crbug.com/140425 |
+ var noLocalPathResolution = |
+ this.params_.type == DialogType.SELECT_SAVEAS_FILE || |
+ this.params_.type == DialogType.SELECT_FOLDER || |
+ this.params_.type == DialogType.SELECT_UPLOAD_FOLDER; |
+ var clientCanHandleDrive = |
satorux1
2013/08/06 02:07:17
Maybe return here?
if (noLocalPathResolution && t
kinaba
2013/08/06 06:20:56
Done.
|
+ !(noLocalPathResolution && this.params_.shouldReturnLocalPath); |
+ |
+ return clientCanHandleDrive && |
(!('driveEnabled' in this.preferences_) || |
satorux1
2013/08/06 02:07:17
Should we check this ('driveEnabled' not in this.p
kinaba
2013/08/06 06:20:56
Done.
|
this.preferences_.driveEnabled); |
}; |