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

Side by Side Diff: components/drive/chromeos/change_list_processor.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_CHROMEOS_CHANGE_LIST_PROCESSOR_H_ 5 #ifndef COMPONENTS_DRIVE_CHROMEOS_CHANGE_LIST_PROCESSOR_H_
6 #define COMPONENTS_DRIVE_CHROMEOS_CHANGE_LIST_PROCESSOR_H_ 6 #define COMPONENTS_DRIVE_CHROMEOS_CHANGE_LIST_PROCESSOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "components/drive/file_errors.h" 18 #include "components/drive/file_errors.h"
19 #include "components/drive/file_errors.h"
20 #include "url/gurl.h" 19 #include "url/gurl.h"
21 20
22 namespace base { 21 namespace base {
23 class CancellationFlag; 22 class CancellationFlag;
24 } // namespace base 23 } // namespace base
25 24
26 namespace google_apis { 25 namespace google_apis {
27 class AboutResource; 26 class AboutResource;
28 class ChangeList; 27 class ChangeList;
29 class FileList; 28 class FileList;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 146
148 // Applies the pre-processed metadata from entry_map_ onto the resource 147 // Applies the pre-processed metadata from entry_map_ onto the resource
149 // metadata. |about_resource| must not be null. 148 // metadata. |about_resource| must not be null.
150 FileError ApplyEntryMap( 149 FileError ApplyEntryMap(
151 int64_t changestamp, 150 int64_t changestamp,
152 std::unique_ptr<google_apis::AboutResource> about_resource); 151 std::unique_ptr<google_apis::AboutResource> about_resource);
153 152
154 // Apply |entry| to resource_metadata_. 153 // Apply |entry| to resource_metadata_.
155 FileError ApplyEntry(const ResourceEntry& entry); 154 FileError ApplyEntry(const ResourceEntry& entry);
156 155
156 // Apply |change| to resource_metadata_.
hashimoto 2017/04/10 11:01:24 No longer needed.
yamaguchi 2017/04/11 07:08:07 Done.
157 FileError ApplyTeamDriveChange(const ResourceEntry& change);
158
157 // Adds the directories changed by the update on |entry| to |changed_dirs_|. 159 // Adds the directories changed by the update on |entry| to |changed_dirs_|.
158 void UpdateChangedDirs(const ResourceEntry& entry); 160 void UpdateChangedDirs(const ResourceEntry& entry);
159 161
160 ResourceMetadata* resource_metadata_; // Not owned. 162 ResourceMetadata* resource_metadata_; // Not owned.
161 base::CancellationFlag* in_shutdown_; // Not owned. 163 base::CancellationFlag* in_shutdown_; // Not owned.
162 164
163 ResourceEntryMap entry_map_; 165 ResourceEntryMap entry_map_;
164 ParentResourceIdMap parent_resource_id_map_; 166 ParentResourceIdMap parent_resource_id_map_;
165 std::unique_ptr<FileChange> changed_files_; 167 std::unique_ptr<FileChange> changed_files_;
166 168
167 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor); 169 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor);
168 }; 170 };
169 171
170 } // namespace internal 172 } // namespace internal
171 } // namespace drive 173 } // namespace drive
172 174
173 #endif // COMPONENTS_DRIVE_CHROMEOS_CHANGE_LIST_PROCESSOR_H_ 175 #endif // COMPONENTS_DRIVE_CHROMEOS_CHANGE_LIST_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698