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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js

Issue 800393003: Fix type annotation to pass the closure compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * MetadataCache is a map from Entry to an object containing properties. 6 * MetadataCache is a map from Entry to an object containing properties.
7 * Properties are divided by types, and all properties of one type are accessed 7 * Properties are divided by types, and all properties of one type are accessed
8 * at once. 8 * at once.
9 * Some of the properties: 9 * Some of the properties:
10 * { 10 * {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 new ExternalProvider(volumeManager), 122 new ExternalProvider(volumeManager),
123 new FilesystemProvider(), 123 new FilesystemProvider(),
124 new ContentProvider() 124 new ContentProvider()
125 ]); 125 ]);
126 }; 126 };
127 127
128 /** 128 /**
129 * Clones metadata entry. Metadata entries may contain scalars, arrays, 129 * Clones metadata entry. Metadata entries may contain scalars, arrays,
130 * hash arrays and Date object. Other objects are not supported. 130 * hash arrays and Date object. Other objects are not supported.
131 * @param {Object} metadata Metadata object. 131 * @param {Object} metadata Metadata object.
132 * @return {!Object} Cloned entry. 132 * @return {Object} Cloned entry.
133 */ 133 */
134 MetadataCache.cloneMetadata = function(metadata) { 134 MetadataCache.cloneMetadata = function(metadata) {
135 if (metadata instanceof Array) { 135 if (metadata instanceof Array) {
136 var result = []; 136 var result = [];
137 for (var index = 0; index < metadata.length; index++) { 137 for (var index = 0; index < metadata.length; index++) {
138 result[index] = MetadataCache.cloneMetadata(metadata[index]); 138 result[index] = MetadataCache.cloneMetadata(metadata[index]);
139 } 139 }
140 return result; 140 return result;
141 } else if (metadata instanceof Date) { 141 } else if (metadata instanceof Date) {
142 var result = new Date(); 142 var result = new Date();
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 1109
1110 /** 1110 /**
1111 * Handles the 'log' message from the worker. 1111 * Handles the 'log' message from the worker.
1112 * @param {Array.<*>} arglist Log arguments. 1112 * @param {Array.<*>} arglist Log arguments.
1113 * @private 1113 * @private
1114 */ 1114 */
1115 ContentProvider.prototype.onLog_ = function(arglist) { 1115 ContentProvider.prototype.onLog_ = function(arglist) {
1116 if (MetadataCache.log) // Avoid log spam by default. 1116 if (MetadataCache.log) // Avoid log spam by default.
1117 console.log.apply(console, ['metadata:'].concat(arglist)); 1117 console.log.apply(console, ['metadata:'].concat(arglist));
1118 }; 1118 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698