| Index: chrome/browser/resources/settings/device_page/storage.js
|
| diff --git a/chrome/browser/resources/settings/device_page/storage.js b/chrome/browser/resources/settings/device_page/storage.js
|
| index 6649b8397e41b38e246e59b5070d050a1c6e71a6..4517f980cf045748b72848655802582f9e6703b7 100644
|
| --- a/chrome/browser/resources/settings/device_page/storage.js
|
| +++ b/chrome/browser/resources/settings/device_page/storage.js
|
| @@ -55,6 +55,12 @@ Polymer({
|
| value: function() { return loadTimeData.getBoolean('isGuest'); }
|
| },
|
|
|
| + /** @private */
|
| + hasDriveCache_: {
|
| + type: Boolean,
|
| + value: false
|
| + },
|
| +
|
| /** @private {settings.StorageSizeStat} */
|
| sizeStat_: Object,
|
| },
|
| @@ -128,7 +134,8 @@ Polymer({
|
| */
|
| onDriveCacheTap_: function(e) {
|
| e.preventDefault();
|
| - this.$.storageDriveCache.open();
|
| + if (this.hasDriveCache_)
|
| + this.$.storageDriveCache.open();
|
| },
|
|
|
| /**
|
| @@ -177,11 +184,14 @@ Polymer({
|
| /**
|
| * @param {string} size Formatted string representing the size of Offline
|
| * files.
|
| + * @param {boolean} hasCache True if the device has at least one offline file.
|
| * @private
|
| */
|
| - handleDriveCacheSizeChanged_: function(size) {
|
| - if (this.driveEnabled_)
|
| + handleDriveCacheSizeChanged_: function(size, hasCache) {
|
| + if (this.driveEnabled_) {
|
| this.$$('#driveCacheSize').textContent = size;
|
| + this.hasDriveCache_ = hasCache;
|
| + }
|
| },
|
|
|
| /**
|
|
|