DescriptionReplace GDataDirectory::TakeEntry with GDataDirectoryService::MoveEntryToDirectory.
* Replace FilePathUpdateCallback with FileMoveCallback, and move this typedef to gdata_files.h
* GDataDirectoryService::AddEntryToDirectory has been renamed to MoveEntryToDirectory, and now takes FileMoveCallback, and calls RemoveChild on the parent, as TakeEntry used to do. Also add a ui thread DCHECK and fix tests.
* Get rid of GDataDirectory::TakeEntry, replacing all invocations with GDataDirectoryService::MoveEntryToDirectory.
* Introduce callbacks OnMoveEntryToDirectoryWithFileMoveCallback, and OnMoveEntryToDirectoryWithFileOperationCallback to call OnDirectoryChanged and run callbacks.
* Replace GDataFileSystem callbacks OnRenameResourceCompleted and OnRemoveEntryFromDirectoryCompleted with RenameFileOnFilesystem and RemoveEntryFromDirectoryOnFilesystem.
* Get rid of GDataFilesystem::AddEntryToDirectoryOnFilesystem.
* Make RemoveChildren, RemoveChildFiles, RemoveChildDirectories private.
* FromDocumentEntry should take parent NULL, as should GDataDirectory/GDataFile ctors. This will be more comprehensively fixed in a future patch. The fixes in this patch are necessary for unit tests.
* Replace FOR_EACH_OBSERVER(Observers OnDirectoryChanged) with OnDirectoryChanged, for brevity.
* Add gdata::test_util::CopyErrorCodeFromFileMoveCallback for gdata_files_unittest.
BUG=137725
TEST=unit tests, manual test moving files in the same directory and between directories.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150684
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 15
Patch Set 4 : satorux feedback #Patch Set 5 : minor #Patch Set 6 : CopyErrorCodeFromFilePathUpdateCallback #Patch Set 7 : expect/assert after RunBlockingTask #
Total comments: 23
Patch Set 8 : rebase #Patch Set 9 : renames as per feedback #
Total comments: 8
Patch Set 10 : better tests #
Total comments: 1
Messages
Total messages: 12 (0 generated)
|