Index: chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js |
diff --git a/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js b/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js |
index 64c424dfce7d993b1a2d4a9164c7656183a1f95c..9cabd05873c1fd99ee6770754d650651072bbdb4 100644 |
--- a/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js |
+++ b/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js |
@@ -115,8 +115,10 @@ MetadataCache.EVICTION_THRESHOLD_MARGIN = 500; |
*/ |
MetadataCache.createFull = function(volumeManager) { |
var cache = new MetadataCache(); |
- cache.providers_.push(new FilesystemProvider()); |
+ // DriveProvider should be prior to FileSystemProvider, because it covers |
+ // FileSystemProvider for files in Drive. |
cache.providers_.push(new DriveProvider(volumeManager)); |
+ cache.providers_.push(new FilesystemProvider()); |
cache.providers_.push(new ContentProvider()); |
return cache; |
}; |
@@ -681,7 +683,7 @@ FilesystemProvider.prototype.fetch = function( |
function onMetadata(entry, metadata) { |
callback({ |
filesystem: { |
- size: entry.isFile ? (metadata.size || 0) : -1, |
+ size: (metadata.size || 0), |
modificationTime: metadata.modificationTime |
} |
}); |
@@ -735,7 +737,7 @@ DriveProvider.prototype.supportsEntry = function(entry) { |
*/ |
DriveProvider.prototype.providesType = function(type) { |
return type === 'drive' || type === 'thumbnail' || |
- type === 'streaming' || type === 'media'; |
+ type === 'streaming' || type === 'media' || type === 'filesystem'; |
}; |
/** |
@@ -839,6 +841,11 @@ DriveProvider.prototype.convert_ = function(data, entry) { |
shared: data.shared |
}; |
+ result.filesystem = { |
+ size: (entry.isFile ? (data.fileSize || 0) : -1), |
hirono
2014/03/17 02:28:00
How about this line?
yoshiki
2014/03/17 04:06:15
Sorry, I was misunderstood and changed my mind. I
|
+ modificationTime: new Date(data.lastModifiedTime) |
+ }; |
+ |
if (!data.isPresent) { |
// Block the local fetch for drive files, which require downloading. |
result.thumbnail = {url: '', transform: null}; |