| Index: components/drive/resource_entry_conversion.cc
|
| diff --git a/components/drive/resource_entry_conversion.cc b/components/drive/resource_entry_conversion.cc
|
| index 52eda29bffc8b0f0c4a9c826d707920a90129d48..ebc366ca85bf91308702843ba4041aacd6b4c82f 100644
|
| --- a/components/drive/resource_entry_conversion.cc
|
| +++ b/components/drive/resource_entry_conversion.cc
|
| @@ -29,7 +29,7 @@ bool ConvertChangeResourceToResourceEntry(
|
| if (input.file() &&
|
| !ConvertFileResourceToResourceEntry(*input.file(), &converted,
|
| &parent_resource_id))
|
| - return false;
|
| + return false;
|
|
|
| converted.set_resource_id(input.file_id());
|
| converted.set_deleted(converted.deleted() || input.is_deleted());
|
| @@ -141,4 +141,22 @@ void ConvertResourceEntryToFileInfo(const ResourceEntry& entry,
|
| entry.file_info().creation_time());
|
| }
|
|
|
| +bool ConvertTeamDriveChangeResourceToResourceEntry(
|
| + const google_apis::ChangeResource& input,
|
| + ResourceEntry* out_entry) {
|
| + DCHECK(out_entry);
|
| + DCHECK_EQ(google_apis::ChangeResource::TEAM_DRIVE, input.type());
|
| + ResourceEntry converted;
|
| + converted.mutable_file_info()->set_is_directory(true);
|
| + converted.set_parent_local_id(util::kDriveTeamDrivesDirLocalId);
|
| + if (input.team_drive()) {
|
| + converted.set_title(input.team_drive()->name());
|
| + converted.set_resource_id(input.team_drive()->id());
|
| + }
|
| + converted.set_deleted(input.is_deleted());
|
| + converted.set_modification_date(input.modification_date().ToInternalValue());
|
| + out_entry->Swap(&converted);
|
| + return true;
|
| +}
|
| +
|
| } // namespace drive
|
|
|