Commit 30128b70 authored by hirono's avatar hirono Committed by Commit bot

Fix annottation of FileEntry to Entry.

Previously new metadata related codes use FileEntry as an input type in the
annotation, but it should be Entry because they can take DirectoryEntry also.

BUG=410766
TEST=None

Review URL: https://codereview.chromium.org/897573003

Cr-Commit-Position: refs/heads/master@{#314993}
parent 940e7a01
...@@ -42,7 +42,7 @@ function FileSystemMetadata( ...@@ -42,7 +42,7 @@ function FileSystemMetadata(
/** /**
* Obtains metadata for entries. * Obtains metadata for entries.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Metadata property names to be obtained. * @param {!Array<string>} names Metadata property names to be obtained.
* @return {!Promise<!Array<!ExternalMetadataProperties>>} * @return {!Promise<!Array<!ExternalMetadataProperties>>}
*/ */
...@@ -83,7 +83,7 @@ FileSystemMetadata.prototype.get = function(entries, names) { ...@@ -83,7 +83,7 @@ FileSystemMetadata.prototype.get = function(entries, names) {
/** /**
* Obtains metadata cache for entries. * Obtains metadata cache for entries.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Metadata property names to be obtained. * @param {!Array<string>} names Metadata property names to be obtained.
* @return {!Array<!ExternalMetadataProperties>} * @return {!Array<!ExternalMetadataProperties>}
*/ */
...@@ -93,7 +93,7 @@ FileSystemMetadata.prototype.getCache = function(entries, names) { ...@@ -93,7 +93,7 @@ FileSystemMetadata.prototype.getCache = function(entries, names) {
/** /**
* Clears old metadata for newly created entries. * Clears old metadata for newly created entries.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
*/ */
FileSystemMetadata.prototype.notifyEntryCreated = function(entries) { FileSystemMetadata.prototype.notifyEntryCreated = function(entries) {
this.cache_.clear(entries); this.cache_.clear(entries);
......
...@@ -19,7 +19,7 @@ function MetadataCacheSet(items) { ...@@ -19,7 +19,7 @@ function MetadataCacheSet(items) {
/** /**
* Creates list of MetadataRequest based on the cache state. * Creates list of MetadataRequest based on the cache state.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
* @param {!Array<string>} names * @param {!Array<string>} names
* @return {!Array<!MetadataRequest>} * @return {!Array<!MetadataRequest>}
*/ */
...@@ -56,7 +56,7 @@ MetadataCacheSet.prototype.startRequests = function(requestId, requests) { ...@@ -56,7 +56,7 @@ MetadataCacheSet.prototype.startRequests = function(requestId, requests) {
* Stores results from NewMetadataProvider with the request Id. * Stores results from NewMetadataProvider with the request Id.
* @param {number} requestId Request ID. If a newer operation has already been * @param {number} requestId Request ID. If a newer operation has already been
* done, the results must be ingored. * done, the results must be ingored.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
* @param {!Array<!Object>} results * @param {!Array<!Object>} results
* @return {boolean} Whether at least one result is stored or not. * @return {boolean} Whether at least one result is stored or not.
*/ */
...@@ -75,7 +75,7 @@ MetadataCacheSet.prototype.storeProperties = function( ...@@ -75,7 +75,7 @@ MetadataCacheSet.prototype.storeProperties = function(
/** /**
* Obtains cached properties for entries and names. * Obtains cached properties for entries and names.
* Note that it returns invalidated properties also. * Note that it returns invalidated properties also.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Property names. * @param {!Array<string>} names Property names.
*/ */
MetadataCacheSet.prototype.get = function(entries, names) { MetadataCacheSet.prototype.get = function(entries, names) {
...@@ -92,7 +92,7 @@ MetadataCacheSet.prototype.get = function(entries, names) { ...@@ -92,7 +92,7 @@ MetadataCacheSet.prototype.get = function(entries, names) {
* time of startRequests. * time of startRequests.
* @param {number} requestId Request ID of the invalidation request. This must * @param {number} requestId Request ID of the invalidation request. This must
* be larger than other requets ID passed to the set before. * be larger than other requets ID passed to the set before.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
*/ */
MetadataCacheSet.prototype.invalidate = function(requestId, entries) { MetadataCacheSet.prototype.invalidate = function(requestId, entries) {
for (var i = 0; i < entries.length; i++) { for (var i = 0; i < entries.length; i++) {
...@@ -104,7 +104,7 @@ MetadataCacheSet.prototype.invalidate = function(requestId, entries) { ...@@ -104,7 +104,7 @@ MetadataCacheSet.prototype.invalidate = function(requestId, entries) {
/** /**
* Clears the caches of entries. * Clears the caches of entries.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
*/ */
MetadataCacheSet.prototype.clear = function(entries) { MetadataCacheSet.prototype.clear = function(entries) {
for (var i = 0; i < entries.length; i++) { for (var i = 0; i < entries.length; i++) {
...@@ -114,7 +114,7 @@ MetadataCacheSet.prototype.clear = function(entries) { ...@@ -114,7 +114,7 @@ MetadataCacheSet.prototype.clear = function(entries) {
/** /**
* Creates snapshot of the cache for entries. * Creates snapshot of the cache for entries.
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
*/ */
MetadataCacheSet.prototype.createSnapshot = function(entries) { MetadataCacheSet.prototype.createSnapshot = function(entries) {
var items = {}; var items = {};
...@@ -129,7 +129,7 @@ MetadataCacheSet.prototype.createSnapshot = function(entries) { ...@@ -129,7 +129,7 @@ MetadataCacheSet.prototype.createSnapshot = function(entries) {
/** /**
* Returns whether all the given properties are fulfilled. * Returns whether all the given properties are fulfilled.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Property names. * @param {!Array<string>} names Property names.
* @return {boolean} * @return {boolean}
*/ */
...@@ -260,14 +260,14 @@ MetadataCacheSetStorageForLRUCache.prototype.remove = function(url) { ...@@ -260,14 +260,14 @@ MetadataCacheSetStorageForLRUCache.prototype.remove = function(url) {
}; };
/** /**
* @param {!FileEntry} entry Entry * @param {!Entry} entry Entry
* @param {!Array<string>} names Property name list to be requested. * @param {!Array<string>} names Property name list to be requested.
* @constructor * @constructor
* @struct * @struct
*/ */
function MetadataRequest(entry, names) { function MetadataRequest(entry, names) {
/** /**
* @public {!FileEntry} * @public {!Entry}
* @const * @const
*/ */
this.entry = entry; this.entry = entry;
......
...@@ -45,7 +45,7 @@ NewMetadataProvider.prototype.getImpl; ...@@ -45,7 +45,7 @@ NewMetadataProvider.prototype.getImpl;
/** /**
* Obtains metadata for entries. * Obtains metadata for entries.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Metadata property names to be obtained. * @param {!Array<string>} names Metadata property names to be obtained.
* @return {!Promise<!Array<!T>>} * @return {!Promise<!Array<!T>>}
*/ */
...@@ -116,7 +116,7 @@ NewMetadataProvider.prototype.get = function(entries, names) { ...@@ -116,7 +116,7 @@ NewMetadataProvider.prototype.get = function(entries, names) {
/** /**
* Obtains metadata cache for entries. * Obtains metadata cache for entries.
* @param {!Array<!FileEntry>} entries Entries. * @param {!Array<!Entry>} entries Entries.
* @param {!Array<string>} names Metadata property names to be obtained. * @param {!Array<string>} names Metadata property names to be obtained.
* @return {!Array<!T>} * @return {!Array<!T>}
*/ */
...@@ -125,7 +125,7 @@ NewMetadataProvider.prototype.getCache = function(entries, names) { ...@@ -125,7 +125,7 @@ NewMetadataProvider.prototype.getCache = function(entries, names) {
}; };
/** /**
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
* @param {!Array<string>} names * @param {!Array<string>} names
* @param {!MetadataCacheSet} cache * @param {!MetadataCacheSet} cache
* @param {function(!T):undefined} fulfill * @param {function(!T):undefined} fulfill
...@@ -137,7 +137,7 @@ NewMetadataProvider.prototype.getCache = function(entries, names) { ...@@ -137,7 +137,7 @@ NewMetadataProvider.prototype.getCache = function(entries, names) {
function MetadataProviderCallbackRequest( function MetadataProviderCallbackRequest(
entries, names, cache, fulfill, reject) { entries, names, cache, fulfill, reject) {
/** /**
* @private {!Array<!FileEntry>} * @private {!Array<!Entry>}
* @const * @const
*/ */
this.entries_ = entries; this.entries_ = entries;
...@@ -171,7 +171,7 @@ function MetadataProviderCallbackRequest( ...@@ -171,7 +171,7 @@ function MetadataProviderCallbackRequest(
* Stores properties to snapshot cache of the callback request. * Stores properties to snapshot cache of the callback request.
* If all the requested property are served, it invokes the callback. * If all the requested property are served, it invokes the callback.
* @param {number} requestId * @param {number} requestId
* @param {!Array<!FileEntry>} entries * @param {!Array<!Entry>} entries
* @param {!Array<!Object>} objects * @param {!Array<!Object>} objects
* @return {boolean} Whether the callback is invoked or not. * @return {boolean} Whether the callback is invoked or not.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment