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

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

Issue 522533003: [fsp] Remove the unused streaming field. (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 | chrome/common/extensions/api/file_browser_private.idl » ('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..d41b065db8ce746c9e7b1e34dd30ba4d9b7df381 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -97,6 +97,24 @@ void FillDriveEntryPropertiesValue(const drive::ResourceEntry& entry_proto,
new bool(file_specific_info.cache_state().is_pinned()));
properties->is_present.reset(
new bool(file_specific_info.cache_state().is_present()));
+
+ if (file_specific_info.cache_state().is_present()) {
+ properties->is_available_offline.reset(new bool(true));
+ } else if (file_specific_info.is_hosted_document() &&
+ file_specific_info.has_document_extension()) {
+ const std::string file_extension = file_specific_info.document_extension();
+ // What's available offline? See the 'Web' column at:
+ // http://support.google.com/drive/answer/1628467
+ properties->is_available_offline.reset(
+ new bool(file_extension == ".gdoc" || file_extension == ".gdraw" ||
+ file_extension == ".gsheet" || file_extension == ".gslides"));
yoshiki 2014/09/01 02:41:04 (maybe out of this patch's work) I think we shoul
mtomasz 2014/09/01 02:43:53 Good idea. Let me do it in a separate CL.
+ } else {
+ properties->is_available_offline.reset(new bool(false));
+ }
+
+ properties->is_available_when_metered.reset(
+ new bool(file_specific_info.cache_state().is_present() ||
+ file_specific_info.is_hosted_document()));
}
// Creates entry definition list for (metadata) search result info list.
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_browser_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698