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

Unified Diff: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js

Issue 801533006: Add type annotations to gallery/js/gallery.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary annotations. Created 6 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
Index: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
index d3d9426570ae09264f8343ade952940bc36b80df..fe4556b19bc68bce646579ca575792d89767a8c0 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
@@ -111,7 +111,8 @@ MetadataCache.DESCENDANTS = 2;
MetadataCache.EVICTION_THRESHOLD_MARGIN = 500;
/**
- * @param {VolumeManagerWrapper} volumeManager Volume manager instance.
+ * @param {VolumeManagerCommon.VolumeInfoProvider} volumeManager Volume manager
+ * instance.
* @return {MetadataCache!} The cache with all providers.
*/
MetadataCache.createFull = function(volumeManager) {
@@ -128,7 +129,7 @@ MetadataCache.createFull = function(volumeManager) {
* Clones metadata entry. Metadata entries may contain scalars, arrays,
* hash arrays and Date object. Other objects are not supported.
* @param {Object} metadata Metadata object.
- * @return {Object} Cloned entry.
+ * @return {!Object} Cloned entry.
*/
MetadataCache.cloneMetadata = function(metadata) {
if (metadata instanceof Array) {
@@ -773,7 +774,8 @@ FilesystemProvider.prototype.fetch = function(
* This provider returns the following objects:
* external: { pinned, hosted, present, customIconUrl, etc. }
* thumbnail: { url, transform }
- * @param {VolumeManagerWrapper} volumeManager Volume manager instance.
+ * @param {VolumeManagerCommon.VolumeInfoProvider} volumeManager Volume manager
+ * instance.
* @constructor
* @extends {MetadataProvider}
*/
@@ -781,7 +783,7 @@ function ExternalProvider(volumeManager) {
MetadataProvider.call(this);
/**
- * @type {VolumeManagerWrapper}
+ * @type {VolumeManagerCommon.VolumeInfoProvider}
* @private
*/
this.volumeManager_ = volumeManager;
@@ -803,11 +805,11 @@ ExternalProvider.prototype = {
* @return {boolean} Whether this provider supports the entry.
*/
ExternalProvider.prototype.supportsEntry = function(entry) {
- var locationInfo = this.volumeManager_.getLocationInfo(entry);
- if (!locationInfo)
+ var volumeInfo = this.volumeManager_.getVolumeInfo(entry);
+ if (!volumeInfo)
return false;
- return locationInfo.isDriveBased ||
- locationInfo.rootType === VolumeManagerCommon.RootType.PROVIDED;
+ return volumeInfo.volumeType === VolumeManagerCommon.VolumeType.DRIVE ||
+ volumeInfo.volumeType === VolumeManagerCommon.VolumeType.PROVIDED;
};
/**
@@ -954,7 +956,6 @@ function ContentProvider() {
/**
* Path of a worker script.
* @type {string}
fukino 2014/12/12 15:15:25 Didn't the compiler accept this as const?
yawano 2014/12/15 01:45:24 We assign new value at gallery/js/gallery.js, and
fukino 2014/12/15 02:15:28 Thanks. I agree that both WORKER_SCRIPT shouldn't
- * @const
*/
ContentProvider.WORKER_SCRIPT =
'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +

Powered by Google App Engine
This is Rietveld 408576698