DescriptionMake DriveFeedProcessor asynchronous.
DriveResourceMetadata:
* Add RefreshEntryProto, which will eventually replace RefreshFile. It handles update of metadata, change of parents, and both files and directories.
* Introduce AddEntryToParent which adds a DriveEntryProto to the tree. It calls AddEntryToDirectoryInternal which contains common code for AddEntryToParent and AddEntryToDirectory.
* Both AddEntryToParent and RefreshEntryProto use GetParent, a helper to determine the parent.
* GetChildDirectories recursively gets the list of all children directory paths.
* unit tests for these functions.
* update unit tests to remove dependence on drive_files.h
DriveFeedProcessor:
* ApplyEntryProto calls DriveResourceMetadata::GetEntryInfoByResourceId.
* ContinueApplyEntryProto calls RemoveEntryFromParent for deleted entries, RefreshEntryProto for existing entries, and AddEntryToParent for new entries.
* RefreshEntryProto calls DriveResourceMetadata::RefreshEntryProto.
* NotifyForRefreshEntryProto updates changed_dirs_ with the list of affected directories to be notified.
* AddEntryToParent calls DriveResourceMetadata::AddEntryToParent.
* NotifyForAddEntryToParent updates changed_dirs_ with affected directories to be notified.
* RemoveEntryFromParent first fetches all child directories that need to be notified.
* OnGetChildrenForRemove calls DriveResourceMetadata::RemoveEntryFromParent.
* NotifyForRemoveEntryFromParent updates changed_dirs_ with affected directories to be notified.
A number of functions are now unused. They have been marked with TODOs since this patch is rather large.
BUG=137374
TEST=unit tests.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=168653
Patch Set 1 #Patch Set 2 : indentation #
Total comments: 2
Patch Set 3 : unittests and satorux feedback #
Total comments: 14
Patch Set 4 : hashimoto feedback #Patch Set 5 : remove drive_files.h from unittest #
Total comments: 8
Patch Set 6 : hashimoto feedback #Patch Set 7 : minor rename #Patch Set 8 : satorux feedback #
Total comments: 14
Patch Set 9 : rebase #Patch Set 10 : merge conflicts + feedback #
Messages
Total messages: 19 (0 generated)
|