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

Unified Diff: components/drive/chromeos/change_list_processor.h

Issue 2799603002: Process TeamDrive change in change list. (Closed)
Patch Set: Avoid crash when receiving TD deletion entry. 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/chromeos/change_list_processor.h
diff --git a/components/drive/chromeos/change_list_processor.h b/components/drive/chromeos/change_list_processor.h
index 0c23efa0d41a973e3df8468aaea60459dbfeeeae..add2c9fa5e3b923fe8d2689d571c552cad729c95 100644
--- a/components/drive/chromeos/change_list_processor.h
+++ b/components/drive/chromeos/change_list_processor.h
@@ -16,7 +16,6 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "components/drive/file_errors.h"
-#include "components/drive/file_errors.h"
#include "url/gurl.h"
namespace base {
@@ -82,6 +81,8 @@ class ChangeList {
const std::vector<ResourceEntry>& entries() const { return entries_; }
std::vector<ResourceEntry>* mutable_entries() { return &entries_; }
+ const std::vector<ResourceEntry>& team_drives() const { return team_drives_; }
+ std::vector<ResourceEntry>* mutable_team_drives() { return &team_drives_; }
const std::vector<std::string>& parent_resource_ids() const {
return parent_resource_ids_;
}
@@ -97,6 +98,7 @@ class ChangeList {
private:
std::vector<ResourceEntry> entries_;
+ std::vector<ResourceEntry> team_drives_;
std::vector<std::string> parent_resource_ids_;
GURL next_url_;
int64_t largest_changestamp_;
@@ -154,6 +156,9 @@ class ChangeListProcessor {
// Apply |entry| to resource_metadata_.
FileError ApplyEntry(const ResourceEntry& entry);
+ // Apply |change| to resource_metadata_.
+ FileError ApplyTeamDriveChange(const ResourceEntry& change);
+
// Adds the directories changed by the update on |entry| to |changed_dirs_|.
void UpdateChangedDirs(const ResourceEntry& entry);

Powered by Google App Engine
This is Rietveld 408576698