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

Issue 2637163002: Defer ARC file system operations while ARC is booting. (Closed)

Created:
3 years, 11 months ago by Shuhei Takahashi
Modified:
3 years, 11 months ago
Reviewers:
hidehiko, mtomasz, hashimoto
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yamaguchi+watch_chromium.org, yusukes+watch_chromium.org, tzik, hidehiko+watch_chromium.org, oka+watch_chromium.org, nhiroki, rginda+watch_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, fukino+watch_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Defer ARC file system operations while ARC is booting. An additional abstraction layer, ArcFileSystemOperationRunner, is inserted above mojom::FileSystemInstance. Its production implementation is ArcDeferredFileSystemOperationRunner, which defers file system operations while ARC is booting. This provides better UX when the user attempts to perform file operations while ARC is booting. For example: - Media views are mounted in Files app soon after the user logs into the system. If the user attempts to open media views before ARC boots, a spinner is shown until file system gets ready because ReadDirectory operations are deferred. - When an Android content URL is opened soon after the user logs into the system (because the user opened the tab before they logged out for instance), the tab keeps loading until ARC boot finishes, instead of failing immediately. This patch also changes following points for better media view UX: - Mount/unmount media view volumes according to ARC opt-in status, not ARC file system instance availability. - Add a short circuit in ArcDocumentsProviderRoot to return a metadata for root directories. Otherwise Files app fails to update the file system list (the left pane of UI) until deferred operations finish. BUG=chromium:682577 TEST=unit_tests TEST=Media views are mounted immediately, and a spinner is shown if it is opened. Review-Url: https://codereview.chromium.org/2637163002 Cr-Commit-Position: refs/heads/master@{#445657} Committed: https://chromium.googlesource.com/chromium/src/+/d280ab1a052245d5bcacf63a4478fc3c0f085899

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : Review ready. #

Total comments: 27

Patch Set 6 : Addressed hidehiko's comments. #

Total comments: 12

Patch Set 7 : Addressed hashimoto's comments. #

Patch Set 8 : Do not reuse RunLoop. #

Total comments: 2

Patch Set 9 : Addressed hashimoto's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+787 lines, -365 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_service_launcher.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc View 1 2 3 4 5 4 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc View 1 2 3 4 5 4 chunks +20 lines, -18 lines 0 comments Download
A chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h View 1 2 3 4 5 6 1 chunk +99 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc View 1 2 3 4 5 6 1 chunk +172 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +182 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc View 1 2 3 4 5 4 chunks +15 lines, -7 lines 0 comments Download
D chrome/browser/chromeos/arc/fileapi/arc_file_system_instance_util.h View 1 2 1 chunk +0 lines, -40 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_file_system_instance_util.cc View 1 2 1 chunk +0 lines, -133 lines 0 comments Download
A + chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.h View 1 2 3 4 5 4 chunks +8 lines, -8 lines 0 comments Download
A + chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc View 1 2 3 4 5 3 chunks +26 lines, -37 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h View 1 2 3 4 5 1 chunk +4 lines, -19 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc View 1 2 3 chunks +0 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager.h View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager.cc View 1 2 3 4 5 6 5 chunks +26 lines, -28 lines 0 comments Download
M components/arc/BUILD.gn View 1 2 2 chunks +4 lines, -1 line 0 comments Download
D components/arc/file_system/arc_file_system_observer.h View 1 2 1 chunk +0 lines, -23 lines 0 comments Download
A components/arc/file_system/arc_file_system_operation_runner.h View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download
A components/arc/file_system/arc_file_system_operation_runner.cc View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
A components/arc/file_system/test/fake_arc_file_system_operation_runner.h View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
A components/arc/file_system/test/fake_arc_file_system_operation_runner.cc View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
M components/arc/test/fake_file_system_instance.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M components/arc/test/fake_file_system_instance.cc View 1 2 3 4 5 6 2 chunks +25 lines, -5 lines 0 comments Download

Messages

Total messages: 50 (36 generated)
Shuhei Takahashi
hidehiko: PTAL as an ARC owner. mtomasz: PTAL as an owner of c/b/c/file_manager. hashimoto: PTAL ...
3 years, 11 months ago (2017-01-19 07:41:23 UTC) #17
mtomasz
c/b/c/file_manager lgtm
3 years, 11 months ago (2017-01-19 07:51:50 UTC) #18
hidehiko
Nice CL! Almost l-gtm. https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h File chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h (right): https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h#newcode23 chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h:23: // Implements deferred ARC file ...
3 years, 11 months ago (2017-01-20 08:01:49 UTC) #21
Shuhei Takahashi
https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h File chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h (right): https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h#newcode23 chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h:23: // Implements deferred ARC file system operations. On 2017/01/20 ...
3 years, 11 months ago (2017-01-20 09:13:04 UTC) #24
hidehiko
lgtm. defer to hashimoto@. https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc File chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc (right): https://codereview.chromium.org/2637163002/diff/80001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc#newcode55 chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc:55: kAndroidDirectoryMimeType, -1, 0}; On 2017/01/20 ...
3 years, 11 months ago (2017-01-20 10:06:26 UTC) #25
hashimoto
https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc File chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc (right): https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc#newcode59 chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc:59: callback.Run(-1); Could you run the callback asynchronously here, using ...
3 years, 11 months ago (2017-01-23 08:28:43 UTC) #28
Shuhei Takahashi
hashimoto: PTAL https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc File chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc (right): https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc#newcode59 chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc:59: callback.Run(-1); On 2017/01/23 08:28:42, hashimoto wrote: > ...
3 years, 11 months ago (2017-01-23 09:17:52 UTC) #31
Shuhei Takahashi
Oops, base::RunLoop has DCHECK() to forbid reuse. I uploaded a new patch to fix buildbot ...
3 years, 11 months ago (2017-01-23 10:37:16 UTC) #36
hashimoto
lgtm https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc File chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc (right): https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc#newcode129 chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc:129: base::Time::UnixEpoch(); On 2017/01/23 09:17:51, Shuhei Takahashi wrote: > ...
3 years, 11 months ago (2017-01-24 04:05:45 UTC) #39
Shuhei Takahashi
https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc File chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc (right): https://codereview.chromium.org/2637163002/diff/100001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc#newcode129 chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc:129: base::Time::UnixEpoch(); On 2017/01/24 04:05:45, hashimoto wrote: > On 2017/01/23 ...
3 years, 11 months ago (2017-01-24 04:18:04 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2637163002/160001
3 years, 11 months ago (2017-01-24 04:18:39 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/142370)
3 years, 11 months ago (2017-01-24 05:16:20 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2637163002/160001
3 years, 11 months ago (2017-01-24 05:17:13 UTC) #47
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 05:34:31 UTC) #50
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/d280ab1a052245d5bcacf63a4478...

Powered by Google App Engine
This is Rietveld 408576698