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

Side by Side Diff: chrome/browser/resources/file_manager/js/metadata/metadata_cache.js

Issue 11817041: Fix thumbnail refresh for Drive images (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_grid.js ('k') | 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 url to an object containing properties. 6 * MetadataCache is a map from url 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 /** 528 /**
529 * Ask the GData service to re-fetch the metadata. 529 * Ask the GData service to re-fetch the metadata.
530 * @param {string} fileURL File URL. 530 * @param {string} fileURL File URL.
531 */ 531 */
532 MetadataCache.prototype.refreshFileMetadata = function(fileURL) { 532 MetadataCache.prototype.refreshFileMetadata = function(fileURL) {
533 if (!FileType.isOnGDrive(fileURL)) 533 if (!FileType.isOnGDrive(fileURL))
534 return; 534 return;
535 // TODO(kaznacheev) This does not really work with GData search. 535 // TODO(kaznacheev) This does not really work with GData search.
536 var url = fileURL.substr(0, fileURL.lastIndexOf('/')); 536 var url = fileURL.substr(0, fileURL.lastIndexOf('/'));
537 metadataCache.refreshDirectory(url); 537 this.refreshDirectory(url);
538 }; 538 };
539 539
540 /** 540 /**
541 * Resumes refreshes by resreshDirectory. 541 * Resumes refreshes by resreshDirectory.
542 * @param {string} url Directory URL. 542 * @param {string} url Directory URL.
543 */ 543 */
544 MetadataCache.prototype.resumeRefresh = function(url) { 544 MetadataCache.prototype.resumeRefresh = function(url) {
545 delete this.directoriesWithStaleMetadata_[url]; 545 delete this.directoriesWithStaleMetadata_[url];
546 }; 546 };
547 547
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 999
1000 /** 1000 /**
1001 * Handles the 'log' message from the worker. 1001 * Handles the 'log' message from the worker.
1002 * @param {Array.<*>} arglist Log arguments. 1002 * @param {Array.<*>} arglist Log arguments.
1003 * @private 1003 * @private
1004 */ 1004 */
1005 ContentProvider.prototype.onLog_ = function(arglist) { 1005 ContentProvider.prototype.onLog_ = function(arglist) {
1006 if (MetadataCache.log) // Avoid log spam by default. 1006 if (MetadataCache.log) // Avoid log spam by default.
1007 console.log.apply(console, ['metadata:'].concat(arglist)); 1007 console.log.apply(console, ['metadata:'].concat(arglist));
1008 }; 1008 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_grid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698