Description[fsp] Refactor handling operations.
This CL reorganizes code before adding the read directory implementation.
First of all, operations are now extracted to separate classes, to avoid huge
file_system_provider.cc. Such operation classes are now arguments for the
RequestManager which replaces the former pair of [success, error] callbacks.
Such operation classes are now easy to test, because of ability to cut out
the EventRouter by using Operation::SetDispatchEventImplForTests.
Finally, a RequestValue class has been introduced, which replaces former
base::DictionaryValue. The former solution was not good, since we already
parse the base::Value in api function implementations (using generated from
IDL parsers). So, passing a raw base::Value and later parsing is again is an
overkill.
The RequestValue class is a trivial wrapper for all kinds of IDL values, which
can be passed through the RequestManager to Operation classes.
TEST=unit_tests, browser_tests: *FileSystemProvider*
BUG=248427
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266516
Patch Set 1 #Patch Set 2 : Cleaned up. #Patch Set 3 : Fixed. #
Total comments: 18
Patch Set 4 : Addressed comments. #Patch Set 5 : Cleaned up getters. #Patch Set 6 : Fixed. #Patch Set 7 : Fixed tests. #Messages
Total messages: 26 (0 generated)
|