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

Side by Side Diff: components/drive/resource_entry_conversion.h

Issue 2799603002: Process TeamDrive change in change list. (Closed)
Patch Set: Handle changes to Team Drive by the same path as files, including deletion. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_ 5 #ifndef COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_
6 #define COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_ 6 #define COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 19 matching lines...) Expand all
30 // 1) Entries without parents are allowed on drive.google.com. These entries are 30 // 1) Entries without parents are allowed on drive.google.com. These entries are
31 // collected to "drive/other", and have "drive/other" as the parent. 31 // collected to "drive/other", and have "drive/other" as the parent.
32 // 32 //
33 // 2) Entries with multiple parents are allowed on drive.google.com. For these 33 // 2) Entries with multiple parents are allowed on drive.google.com. For these
34 // entries, the first parent is chosen. 34 // entries, the first parent is chosen.
35 bool ConvertChangeResourceToResourceEntry( 35 bool ConvertChangeResourceToResourceEntry(
36 const google_apis::ChangeResource& input, 36 const google_apis::ChangeResource& input,
37 ResourceEntry* out_entry, 37 ResourceEntry* out_entry,
38 std::string* out_parent_resource_id); 38 std::string* out_parent_resource_id);
39 39
40 // Converts a google_apis::ChangeResource with type=TEAM_DRIVE into a
41 // drive::ResourceEntry.
42 // If the conversion succeeded, return true and sets the result to
43 // |out_entry|.
44 bool ConvertTeamDriveChangeResourceToResourceEntry(
45 const google_apis::ChangeResource& input,
46 ResourceEntry* out_entry,
47 std::string* out_parent_resource_id);
48
40 // Converts a google_apis::FileResource into a drive::ResourceEntry. 49 // Converts a google_apis::FileResource into a drive::ResourceEntry.
41 // Also see the comment for ConvertChangeResourceToResourceEntry above. 50 // Also see the comment for ConvertChangeResourceToResourceEntry above.
42 bool ConvertFileResourceToResourceEntry( 51 bool ConvertFileResourceToResourceEntry(
43 const google_apis::FileResource& input, 52 const google_apis::FileResource& input,
44 ResourceEntry* out_entry, 53 ResourceEntry* out_entry,
45 std::string* out_parent_resource_id); 54 std::string* out_parent_resource_id);
46 55
47 // Converts the resource entry to the platform file info. 56 // Converts the resource entry to the platform file info.
48 void ConvertResourceEntryToFileInfo(const ResourceEntry& entry, 57 void ConvertResourceEntryToFileInfo(const ResourceEntry& entry,
49 base::File::Info* file_info); 58 base::File::Info* file_info);
50 59
51 } // namespace drive 60 } // namespace drive
52 61
53 #endif // COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_ 62 #endif // COMPONENTS_DRIVE_RESOURCE_ENTRY_CONVERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698