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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 517213002: [fsp] Move thumbnail logic to Drive specific C++ code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/thumbnail_loader.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index bd8d719d580bfa0678d5fb5d8be36fb8a2d4a8b5..2a15de30d0e7de40197de14295241bae8e9f1c1a 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -71,7 +71,10 @@ void FillDriveEntryPropertiesValue(const drive::ResourceEntry& entry_proto,
const drive::FileSpecificInfo& file_specific_info =
entry_proto.file_specific_info();
- if (!entry_proto.resource_id().empty()) {
+ // The web thumbnail is used only when the file is not present. Otherwise
+ // it could be out of sync.
+ if (!entry_proto.resource_id().empty() &&
+ !file_specific_info.cache_state().is_present()) {
properties->thumbnail_url.reset(
new std::string("https://www.googledrive.com/thumb/" +
entry_proto.resource_id() + "?width=500&height=500"));
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/thumbnail_loader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698