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

Issue 1432403003: Do not call stat() when reading directories via File API. (Closed)

Created:
5 years, 1 month ago by mtomasz
Modified:
5 years, 1 month ago
Reviewers:
Lei Zhang, hirono, nhiroki, tzik
CC:
chromium-reviews, tzik, Lei Zhang, tfarina, nhiroki, tommycli, oshima+watch_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not call stat() when reading directories via File API. It's very heavy, and on the JavaScript side the metadata is discarded anyway, and another call is used to obtain it. TEST=All existing tests should pass. Tested manually with MTP and chrome://quota-internals, then filesystem://.../isolated in the browser. BUG=558191 Committed: https://crrev.com/4c70fc9c006c7d5a3099cac3842cef8b411d2a49 Cr-Commit-Position: refs/heads/master@{#359768}

Patch Set 1 #

Patch Set 2 : Cleaned up + hopefully fixed MAC and WIN. #

Patch Set 3 : Whitespace cleanup. #

Total comments: 13

Patch Set 4 : Fixed more tests. #

Patch Set 5 : Addressed comments + hopefully fixed MAC/WIN. #

Patch Set 6 : Fixed more MAC/WIN + FSP test. #

Patch Set 7 : I love strawberries and raspberries. #

Patch Set 8 : Fixed FSP tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -199 lines) Patch
M chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/operations/get_metadata_unittest.cc View 1 2 3 4 5 6 7 6 chunks +17 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/operations/read_directory.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc View 1 2 3 4 5 6 3 chunks +2 lines, -15 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/iphoto_file_util.cc View 1 2 3 4 5 5 chunks +7 lines, -12 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/itunes_file_util.cc View 1 2 3 4 5 5 chunks +11 lines, -19 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/native_media_file_util.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/picasa_file_util.cc View 1 2 3 4 5 4 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc View 1 2 3 4 5 6 3 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h View 6 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc View 1 2 3 4 7 chunks +18 lines, -34 lines 0 comments Download
M chrome/browser/media_galleries/linux/mtp_device_task_helper.h View 1 2 3 4 2 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/media_galleries/linux/mtp_device_task_helper.cc View 1 2 3 4 3 chunks +8 lines, -11 lines 0 comments Download
M chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm View 1 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm View 1 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/file_system_provider.idl View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/renderer/resources/extensions/file_system_provider_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +13 lines, -4 lines 0 comments Download
M content/browser/fileapi/dragged_file_util_unittest.cc View 1 2 3 2 chunks +0 lines, -5 lines 0 comments Download
M storage/browser/fileapi/async_file_util_adapter.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M storage/browser/fileapi/file_system_dir_url_request_job.h View 1 chunk +8 lines, -0 lines 0 comments Download
M storage/browser/fileapi/file_system_dir_url_request_job.cc View 1 2 3 4 5 6 1 chunk +44 lines, -7 lines 0 comments Download
M storage/common/fileapi/directory_entry.h View 1 chunk +1 line, -6 lines 0 comments Download
M storage/common/fileapi/directory_entry.cc View 1 chunk +3 lines, -9 lines 0 comments Download

Messages

Total messages: 40 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/40001
5 years, 1 month ago (2015-11-12 05:48:38 UTC) #2
mtomasz
@thestig: PTAL at chrome/browser/media_galleries/* @tzik: PTAL at storage/* and chrome/browser/media_galleries/fileapi/*. @hirono: PTAL at all the ...
5 years, 1 month ago (2015-11-12 05:50:25 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/139586)
5 years, 1 month ago (2015-11-12 05:56:49 UTC) #8
Lei Zhang
c/b/media_galleries lgtm, and thanks for getting rid of that hack. The rest is all nits: ...
5 years, 1 month ago (2015-11-12 07:25:17 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/60001
5 years, 1 month ago (2015-11-12 07:35:59 UTC) #11
mtomasz
https://codereview.chromium.org/1432403003/diff/40001/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc File chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc (right): https://codereview.chromium.org/1432403003/diff/40001/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc#newcode1584 chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc:1584: for (size_t i = 0; i < mtp_entries.size(); ++i) ...
5 years, 1 month ago (2015-11-12 07:48:25 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/80001
5 years, 1 month ago (2015-11-12 07:48:42 UTC) #14
hirono
lgtm!
5 years, 1 month ago (2015-11-12 07:54:45 UTC) #15
Lei Zhang
https://codereview.chromium.org/1432403003/diff/40001/chrome/browser/media_galleries/linux/mtp_device_task_helper.h File chrome/browser/media_galleries/linux/mtp_device_task_helper.h (right): https://codereview.chromium.org/1432403003/diff/40001/chrome/browser/media_galleries/linux/mtp_device_task_helper.h#newcode36 chrome/browser/media_galleries/linux/mtp_device_task_helper.h:36: typedef std::vector<MTPEntry> MTPEntries; On 2015/11/12 07:48:24, mtomasz wrote: > ...
5 years, 1 month ago (2015-11-12 07:56:48 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/28885)
5 years, 1 month ago (2015-11-12 08:04:29 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/100001
5 years, 1 month ago (2015-11-12 08:18:26 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/122215)
5 years, 1 month ago (2015-11-12 08:27:10 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/120001
5 years, 1 month ago (2015-11-12 09:44:36 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/87469)
5 years, 1 month ago (2015-11-12 10:17:29 UTC) #26
mtomasz
@nhiroki: Could you take a look at storage/* and chrome/browser/media_galleries/fileapi/*. @tzik seems to be OOO?
5 years, 1 month ago (2015-11-13 01:08:16 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/140001
5 years, 1 month ago (2015-11-13 01:11:38 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-13 02:28:37 UTC) #33
tzik
Sorry for delay. Yes, we are ooo for BlinkOn5 this week. LGTM. Good point. The ...
5 years, 1 month ago (2015-11-15 04:38:51 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432403003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432403003/140001
5 years, 1 month ago (2015-11-15 07:04:36 UTC) #37
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 1 month ago (2015-11-15 12:11:31 UTC) #38
commit-bot: I haz the power
5 years, 1 month ago (2015-11-15 12:12:26 UTC) #39
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4c70fc9c006c7d5a3099cac3842cef8b411d2a49
Cr-Commit-Position: refs/heads/master@{#359768}

Powered by Google App Engine
This is Rietveld 408576698