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

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

Issue 195763004: Reland of 260688: [Files.app] Use getDriveEntryProperties to retrieve metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adressed the comment Created 6 years, 9 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
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 cdc26ef1db0b3451081a372f2c2e298fde7f5c2c..48542729e500ae702d7c26ea10a63275be588216 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -49,12 +49,16 @@ void FillDriveEntryPropertiesValue(
properties->shared_with_me.reset(new bool(entry_proto.shared_with_me()));
properties->shared.reset(new bool(entry_proto.shared()));
+ const drive::PlatformFileInfoProto& file_info = entry_proto.file_info();
+ properties->file_size.reset(new double(file_info.size()));
+ properties->last_modified_time.reset(new double(
+ base::Time::FromInternalValue(file_info.last_modified()).ToJsTime()));
+
if (!entry_proto.has_file_specific_info())
return;
const drive::FileSpecificInfo& file_specific_info =
entry_proto.file_specific_info();
-
properties->thumbnail_url.reset(
new std::string("https://www.googledrive.com/thumb/" +
entry_proto.resource_id() + "?width=500&height=500"));

Powered by Google App Engine
This is Rietveld 408576698