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

Issue 1110833003: Move the IsSupported* mime functions out of //net and into //components/mime_util (Closed)

Created:
5 years, 7 months ago by Ryan Sleevi
Modified:
5 years, 7 months ago
CC:
asanka, benjhayden+dwatch_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, davemoore+watch_chromium.org, dcheng, ddorwin, Greg Billock, kinuko+fileapi, nasko+codewatch_chromium.org, nhiroki, oshima+watch_chromium.org, rginda+watch_chromium.org, shishir+watch_chromium.org, stevenjb+watch_chromium.org, tfarina, Lei Zhang, tommycli, tzik, vandebo (ex-Chrome)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move the IsSupported* mime functions out of //net and into //components/mime_util Fundamentally, the question of "Is mime type X supported" is a question about what the embedder supports. There's a variety of platform-specific logic already encompassed in this code, particularly around media types (which are not yet extracted), while handling for items such as images are just "assumed" that the embedder will support them, because Blink supports them. Since these aren't questions about the //net stack's support, nor are these functions actually used by //net, uplift these to //components. The media team will extract the remaining functions related to audio, video, and codec support up out of //net and into //media, at which point, //net will no longer worry about these. Note that this is more of a manual move - it intentionally does not correct some of the "obvious" misuses - to facilitate //media owning the media move. BUG=318217 TBR=jochen Committed: https://crrev.com/c327b48f8ef537bb7fe407d4aa2532a4947c2923 Cr-Commit-Position: refs/heads/master@{#327640}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Review feedback & speculative GN build fix #

Total comments: 10

Patch Set 3 : Nit fix #

Patch Set 4 : IWYU fix #

Patch Set 5 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+462 lines, -348 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/file_manager/file_tasks.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_target_determiner.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/media_path_filter.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/drag_util.mm View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 2 chunks +7 lines, -8 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/BUILD.gn View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M components/html_viewer/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/html_viewer/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/html_viewer/blink_platform_impl.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M components/html_viewer/web_mime_registry_impl.cc View 4 chunks +15 lines, -14 lines 0 comments Download
A + components/mime_util/BUILD.gn View 2 chunks +6 lines, -7 lines 0 comments Download
A components/mime_util/DEPS View 1 1 chunk +7 lines, -0 lines 0 comments Download
A components/mime_util/OWNERS View 1 chunk +5 lines, -0 lines 0 comments Download
A components/mime_util/mime_util.h View 1 1 chunk +30 lines, -0 lines 0 comments Download
A components/mime_util/mime_util.cc View 1 2 1 chunk +225 lines, -0 lines 0 comments Download
A + components/mime_util/mime_util.gyp View 1 chunk +9 lines, -6 lines 0 comments Download
A components/mime_util/mime_util_unittest.cc View 1 1 chunk +79 lines, -0 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/loader/buffered_resource_handler.cc View 4 chunks +4 lines, -3 lines 0 comments Download
M content/browser/loader/certificate_resource_handler.cc View 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M content/child/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M content/child/simple_webmimeregistry_impl.cc View 3 chunks +18 lines, -12 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 3 chunks +2 lines, -2 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/content_child.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M net/base/mime_util.h View 2 chunks +0 lines, -11 lines 0 comments Download
M net/base/mime_util.cc View 1 2 3 9 chunks +4 lines, -206 lines 0 comments Download
M net/base/mime_util_unittest.cc View 2 chunks +0 lines, -55 lines 0 comments Download

Messages

Total messages: 37 (11 generated)
Ryan Sleevi
asanka: Can you review the //net bits sky: Can you ensure I properly grokked your ...
5 years, 7 months ago (2015-04-28 00:42:17 UTC) #2
Lei Zhang
https://codereview.chromium.org/1110833003/diff/1/chrome/browser/DEPS File chrome/browser/DEPS (left): https://codereview.chromium.org/1110833003/diff/1/chrome/browser/DEPS#oldcode35 chrome/browser/DEPS:35: "+components/network_hints", Sorting is hard. https://codereview.chromium.org/1110833003/diff/1/chrome/browser/chromeos/DEPS File chrome/browser/chromeos/DEPS (right): https://codereview.chromium.org/1110833003/diff/1/chrome/browser/chromeos/DEPS#newcode2 ...
5 years, 7 months ago (2015-04-28 04:01:03 UTC) #3
sky
This looks fine to me. You'll need to update bots to run the new tests.
5 years, 7 months ago (2015-04-28 13:22:50 UTC) #4
Ryan Sleevi
Updated with feedback and all tests passing now.
5 years, 7 months ago (2015-04-28 22:37:23 UTC) #5
Lei Zhang
lgtm
5 years, 7 months ago (2015-04-28 22:46:21 UTC) #6
sky
LGTM
5 years, 7 months ago (2015-04-28 23:35:33 UTC) #7
servolk
https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (left): https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc#oldcode497 content/browser/frame_host/navigation_controller_impl.cc:497: !net::IsSupportedMediaMimeType(mime_type); I believe this can be simplified to: bool ...
5 years, 7 months ago (2015-04-28 23:38:48 UTC) #9
asanka
Thanks for doing this! LGTM. Comments are minor nits. My only concern, which I expressed ...
5 years, 7 months ago (2015-04-29 00:14:07 UTC) #11
asanka
https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (left): https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc#oldcode497 content/browser/frame_host/navigation_controller_impl.cc:497: !net::IsSupportedMediaMimeType(mime_type); On 2015/04/28 at 23:38:48, servolk wrote: > I ...
5 years, 7 months ago (2015-04-29 02:26:37 UTC) #12
Ryan Sleevi
https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (left): https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc#oldcode497 content/browser/frame_host/navigation_controller_impl.cc:497: !net::IsSupportedMediaMimeType(mime_type); On 2015/04/29 02:26:37, asanka wrote: > The behavior ...
5 years, 7 months ago (2015-04-29 05:29:07 UTC) #13
servolk
On 2015/04/29 05:29:07, Ryan Sleevi wrote: > https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc > File content/browser/frame_host/navigation_controller_impl.cc (left): > > https://codereview.chromium.org/1110833003/diff/20001/content/browser/frame_host/navigation_controller_impl.cc#oldcode497 ...
5 years, 7 months ago (2015-04-29 16:58:30 UTC) #14
Ryan Sleevi
davidben@chromium.org: Please review changes in //content jochen@chromium.org: Please review changes in //components
5 years, 7 months ago (2015-04-29 23:23:48 UTC) #16
davidben
content lgtm apart from IWYU file nits. I did not review the scope of the ...
5 years, 7 months ago (2015-04-29 23:25:11 UTC) #17
Ryan Sleevi
TBR jochen for the last part, which is //components/BUILD.gn
5 years, 7 months ago (2015-04-30 00:34:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1110833003/60001
5 years, 7 months ago (2015-04-30 00:35:31 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/20046) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 7 months ago (2015-04-30 00:40:07 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1110833003/80001
5 years, 7 months ago (2015-04-30 00:47:10 UTC) #26
jam
not lgtm content can only depend on components that it shares with mandoline (see cr-dev ...
5 years, 7 months ago (2015-04-30 00:51:16 UTC) #28
Ryan Sleevi
On 2015/04/30 00:51:16, jam wrote: > not lgtm > > content can only depend on ...
5 years, 7 months ago (2015-04-30 00:51:38 UTC) #29
Ryan Sleevi
On 2015/04/30 00:51:38, Ryan Sleevi wrote: > On 2015/04/30 00:51:16, jam wrote: > > not ...
5 years, 7 months ago (2015-04-30 00:52:08 UTC) #30
jam
On 2015/04/30 00:52:08, Ryan Sleevi wrote: > On 2015/04/30 00:51:38, Ryan Sleevi wrote: > > ...
5 years, 7 months ago (2015-04-30 00:59:48 UTC) #31
Ryan Sleevi
On 2015/04/30 00:59:48, jam wrote: > I think Scott wasn't aware of the policy; I'll ...
5 years, 7 months ago (2015-04-30 01:02:26 UTC) #32
jam
On 2015/04/30 01:02:26, Ryan Sleevi wrote: > On 2015/04/30 00:59:48, jam wrote: > > I ...
5 years, 7 months ago (2015-04-30 01:16:32 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1110833003/80001
5 years, 7 months ago (2015-04-30 01:17:48 UTC) #35
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-04-30 02:03:34 UTC) #36
commit-bot: I haz the power
5 years, 7 months ago (2015-04-30 02:04:26 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c327b48f8ef537bb7fe407d4aa2532a4947c2923
Cr-Commit-Position: refs/heads/master@{#327640}

Powered by Google App Engine
This is Rietveld 408576698