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

Issue 257493004: [fsp] Refactor handling operations. (Closed)

Created:
6 years, 8 months ago by mtomasz
Modified:
6 years, 7 months ago
Reviewers:
kinaba
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+521 lines, -132 lines) Patch
M chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc View 1 2 3 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/operations/operation.h View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/operations/operation.cc View 1 2 3 4 5 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/operations/unmount.h View 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/operations/unmount.cc View 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/provided_file_system.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/chromeos/file_system_provider/provided_file_system.cc View 1 2 3 2 chunks +10 lines, -38 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc View 1 2 3 4 5 6 5 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/request_manager.h View 2 chunks +27 lines, -17 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/request_manager.cc View 5 chunks +15 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/request_manager_unittest.cc View 1 2 3 4 14 chunks +117 lines, -49 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/request_value.h View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/file_system_provider/request_value.cc View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/service.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
mtomasz
@kinaba: PTAL. Thanks!
6 years, 8 months ago (2014-04-24 08:34:51 UTC) #1
kinaba
https://codereview.chromium.org/257493004/diff/40001/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc File chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc (right): https://codereview.chromium.org/257493004/diff/40001/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc#newcode195 chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc:195: scoped_ptr<Params> params(Params::Create(*args_)); nit: The changes for this function looks ...
6 years, 8 months ago (2014-04-25 06:35:06 UTC) #2
mtomasz
https://codereview.chromium.org/257493004/diff/40001/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc File chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc (right): https://codereview.chromium.org/257493004/diff/40001/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc#newcode195 chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc:195: scoped_ptr<Params> params(Params::Create(*args_)); On 2014/04/25 06:35:06, kinaba wrote: > nit: ...
6 years, 7 months ago (2014-04-28 00:42:46 UTC) #3
kinaba
lgtm
6 years, 7 months ago (2014-04-28 00:58:14 UTC) #4
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 00:58:28 UTC) #5
mtomasz
The CQ bit was unchecked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 00:58:30 UTC) #6
mtomasz
On 2014/04/28 00:58:14, kinaba wrote: > lgtm thanks!
6 years, 7 months ago (2014-04-28 00:58:34 UTC) #7
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 00:58:38 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/257493004/60001
6 years, 7 months ago (2014-04-28 00:59:46 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 01:41:23 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit
6 years, 7 months ago (2014-04-28 01:41:23 UTC) #11
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 02:34:36 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/257493004/80001
6 years, 7 months ago (2014-04-28 02:35:48 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 02:44:08 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 7 months ago (2014-04-28 02:44:08 UTC) #15
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 04:05:08 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/257493004/80001
6 years, 7 months ago (2014-04-28 04:05:44 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 04:59:36 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 7 months ago (2014-04-28 04:59:37 UTC) #19
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 05:23:53 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/257493004/100001
6 years, 7 months ago (2014-04-28 05:24:35 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 06:07:34 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit
6 years, 7 months ago (2014-04-28 06:07:34 UTC) #23
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 7 months ago (2014-04-28 06:10:45 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/257493004/100001
6 years, 7 months ago (2014-04-28 06:12:07 UTC) #25
commit-bot: I haz the power
6 years, 7 months ago (2014-04-28 12:12:34 UTC) #26
Message was sent while issue was closed.
Change committed as 266516

Powered by Google App Engine
This is Rietveld 408576698