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

Unified Diff: components/drive/resource_entry_conversion.h

Issue 2799603002: Process TeamDrive change in change list. (Closed)
Patch Set: Do not call SetParentLocalId when not needed. Created 3 years, 8 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: components/drive/resource_entry_conversion.h
diff --git a/components/drive/resource_entry_conversion.h b/components/drive/resource_entry_conversion.h
index 2de228e7e08855f2bed4f9634dd83598518af29c..434a25a58d4bac0abae7e9d898084fc9656cc5d0 100644
--- a/components/drive/resource_entry_conversion.h
+++ b/components/drive/resource_entry_conversion.h
@@ -12,6 +12,7 @@
namespace google_apis {
class ChangeResource;
class FileResource;
+class TeamDriveResource;
}
namespace drive {
@@ -37,6 +38,14 @@ bool ConvertChangeResourceToResourceEntry(
ResourceEntry* out_entry,
std::string* out_parent_resource_id);
+// Converts a google_apis::ChangeResource with type=TEAM_DRIVE into a
+// drive::ResourceEntry.
+// If the conversion succeeded, return true and sets the result to
+// |out_entry|.
+bool ConvertTeamDriveChangeResourceToResourceEntry(
+ const google_apis::ChangeResource& input,
+ ResourceEntry* out_entry);
+
// Converts a google_apis::FileResource into a drive::ResourceEntry.
// Also see the comment for ConvertChangeResourceToResourceEntry above.
bool ConvertFileResourceToResourceEntry(
@@ -44,6 +53,13 @@ bool ConvertFileResourceToResourceEntry(
ResourceEntry* out_entry,
std::string* out_parent_resource_id);
+// Converts a TeamDriveResource into a drive::ResourceEntry.
+// If the conversion succeeded, return true and sets the result to
+// |out_entry|.
+bool ConvertTeamDriveResourceToResourceEntry(
+ const google_apis::TeamDriveResource,
+ const ResourceEntry* out_entry);
+
// Converts the resource entry to the platform file info.
void ConvertResourceEntryToFileInfo(const ResourceEntry& entry,
base::File::Info* file_info);

Powered by Google App Engine
This is Rietveld 408576698