[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 Review URL: https://codereview.chromium.org/257493004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266516 0039d316-1c4b-4281-b951-d872f2087c98
Showing
This diff is collapsed.
Please register or sign in to comment