| Index: ui/file_manager/file_manager/foreground/js/file_manager.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| index a048bf35cbac57c45b784e463872737b4a76d769..30e48ce57b545a1186f462c22305a5e60d83df82 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| @@ -167,14 +167,17 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| var DOUBLE_CLICK_TIMEOUT = 200;
|
|
|
| /**
|
| - * Update the element to display the information about remaining space for
|
| + * Updates the element to display the information about remaining space for
|
| * the storage.
|
| + *
|
| + * @param {!Object<string, number>} sizeStatsResult Map containing remaining
|
| + * space information.
|
| * @param {!Element} spaceInnerBar Block element for a percentage bar
|
| - * representing the remaining space.
|
| + * representing the remaining space.
|
| * @param {!Element} spaceInfoLabel Inline element to contain the message.
|
| * @param {!Element} spaceOuterBar Block element around the percentage bar.
|
| */
|
| - var updateSpaceInfo = function(
|
| + var updateSpaceInfo = function(
|
| sizeStatsResult, spaceInnerBar, spaceInfoLabel, spaceOuterBar) {
|
| spaceInnerBar.removeAttribute('pending');
|
| if (sizeStatsResult) {
|
| @@ -1272,7 +1275,6 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| ThumbnailLoader.LoaderType.CANVAS,
|
| metadata,
|
| undefined, // Media type.
|
| - // TODO(mtomasz): Use Entry instead of paths.
|
| locationInfo.isDriveBased ?
|
| ThumbnailLoader.UseEmbedded.USE_EMBEDDED :
|
| ThumbnailLoader.UseEmbedded.NO_EMBEDDED,
|
| @@ -2233,6 +2235,10 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| if (!this.currentVolumeInfo_)
|
| return;
|
|
|
| + var volumeSpaceInfo =
|
| + this.dialogDom_.querySelector('#volume-space-info');
|
| + var volumeSpaceInfoSeparator =
|
| + this.dialogDom_.querySelector('#volume-space-info-separator');
|
| var volumeSpaceInfoLabel =
|
| this.dialogDom_.querySelector('#volume-space-info-label');
|
| var volumeSpaceInnerBar =
|
| @@ -2240,6 +2246,19 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| var volumeSpaceOuterBar =
|
| this.dialogDom_.querySelector('#volume-space-info-bar').parentNode;
|
|
|
| + var currentVolumeInfo = this.currentVolumeInfo_;
|
| +
|
| + // TODO(mtomasz): Add support for remaining space indication for provided
|
| + // file systems.
|
| + if (currentVolumeInfo.volumeType ==
|
| + VolumeManagerCommon.VolumeType.PROVIDED) {
|
| + volumeSpaceInfo.hidden = true;
|
| + volumeSpaceInfoSeparator.hidden = true;
|
| + return;
|
| + }
|
| +
|
| + volumeSpaceInfo.hidden = false;
|
| + volumeSpaceInfoSeparator.hidden = false;
|
| volumeSpaceInnerBar.setAttribute('pending', '');
|
|
|
| if (showLoadingCaption) {
|
| @@ -2247,7 +2266,6 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| volumeSpaceInnerBar.style.width = '100%';
|
| }
|
|
|
| - var currentVolumeInfo = this.currentVolumeInfo_;
|
| chrome.fileBrowserPrivate.getSizeStats(
|
| currentVolumeInfo.volumeId, function(result) {
|
| var volumeInfo = this.volumeManager_.getVolumeInfo(
|
|
|