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

Issue 401523002: Move media related mimetype functionality out of net/ and into media/. (Closed)

Created:
6 years, 5 months ago by acolwell GONE FROM CHROMIUM
Modified:
6 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org
Project:
chromium
Visibility:
Public.

Description

Move media related mimetype functionality out of net/ and into media/. Code that determines whether particular mimetypes are supported is being moved into media/ so that we can ultimately make this code base decisions on what decoders we actually have available on the platform. This change simply moves the existing code from net/base to media/base. BUG=318217, 163800

Patch Set 1 : #

Total comments: 2

Patch Set 2 : minor fixes #

Patch Set 3 : Rebase #

Total comments: 12

Patch Set 4 : Address CR comments #

Total comments: 8

Patch Set 5 : Address CR comments #

Patch Set 6 : Restore javascript_map_ initialization and fix all net::IsSupportedMimeType() usage. #

Patch Set 7 : Introduce content/common/mime_util.h to avoid code duplication in content/ and chrome/ #

Patch Set 8 : Rebase and add content/common/mime_util.h for realz #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+728 lines, -622 lines) Patch
M chrome/browser/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_target_determiner.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/media_path_filter.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/loader/buffered_resource_handler.cc View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M content/child/DEPS View 1 chunk +1 line, -1 line 0 comments Download
M content/child/assert_matching_enums.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/simple_webmimeregistry_impl.cc View 1 2 3 4 5 6 3 chunks +5 lines, -2 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
A + content/common/mime_util.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -6 lines 0 comments Download
A content/common/mime_util.cc View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 2 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 6 chunks +12 lines, -11 lines 0 comments Download
M content/shell/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M content/shell/app/shell_main_delegate.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
A media/base/mime_util.h View 1 2 3 4 1 chunk +74 lines, -0 lines 0 comments Download
A media/base/mime_util.cc View 1 3 1 chunk +441 lines, -0 lines 0 comments Download
A media/base/mime_util_unittest.cc View 1 2 3 4 1 chunk +136 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M net/base/mime_util.h View 3 chunks +0 lines, -54 lines 0 comments Download
M net/base/mime_util.cc View 1 2 3 4 5 11 chunks +0 lines, -408 lines 0 comments Download
M net/base/mime_util_unittest.cc View 3 chunks +0 lines, -120 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
acolwell GONE FROM CHROMIUM
scherkus & rsleevi: please review everything darin: Owners for content changes https://codereview.chromium.org/401523002/diff/40001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (left): ...
6 years, 5 months ago (2014-07-17 23:19:31 UTC) #1
Ryan Sleevi
Yay! Thanks for this. I think it's the right place, since media, more than anything, ...
6 years, 5 months ago (2014-07-17 23:21:58 UTC) #2
scherkus (not reviewing)
long overdue! now if you also upload media/base/mime_util* files we can look at them too ...
6 years, 5 months ago (2014-07-18 01:02:33 UTC) #3
scherkus (not reviewing)
also here is a sampling of bugs previously filed that relate to this work: https://code.google.com/p/chromium/issues/detail?id=21318 ...
6 years, 5 months ago (2014-07-18 01:06:03 UTC) #4
acolwell GONE FROM CHROMIUM
new files are included now. They got lost as I was moving things around and ...
6 years, 5 months ago (2014-07-18 01:33:51 UTC) #5
scherkus (not reviewing)
https://codereview.chromium.org/401523002/diff/120001/media/base/mime_util.h File media/base/mime_util.h (right): https://codereview.chromium.org/401523002/diff/120001/media/base/mime_util.h#newcode4 media/base/mime_util.h:4: #ifndef MEDIA_BASE_MIME_UTIL_H_ blank line before this https://codereview.chromium.org/401523002/diff/120001/media/base/mime_util.h#newcode70 media/base/mime_util.h:70: MEDIA_EXPORT ...
6 years, 5 months ago (2014-07-18 02:00:00 UTC) #6
darin (slow to review)
LGTM for content/ changes
6 years, 5 months ago (2014-07-18 04:25:44 UTC) #7
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/401523002/diff/120001/media/base/mime_util.h File media/base/mime_util.h (right): https://codereview.chromium.org/401523002/diff/120001/media/base/mime_util.h#newcode4 media/base/mime_util.h:4: #ifndef MEDIA_BASE_MIME_UTIL_H_ On 2014/07/18 02:00:00, scherkus wrote: > blank ...
6 years, 5 months ago (2014-07-18 16:17:12 UTC) #8
scherkus (not reviewing)
lgtm!
6 years, 5 months ago (2014-07-18 16:18:08 UTC) #9
acolwell GONE FROM CHROMIUM
The CQ bit was checked by acolwell@chromium.org
6 years, 5 months ago (2014-07-18 16:18:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/401523002/140001
6 years, 5 months ago (2014-07-18 16:19:19 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 20:32:49 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 20:54:48 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_retina_triggered_tests/builds/25654) mac_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_triggered_tests/builds/25707)
6 years, 5 months ago (2014-07-18 20:54:49 UTC) #14
acolwell GONE FROM CHROMIUM
The CQ bit was checked by acolwell@chromium.org
6 years, 5 months ago (2014-07-18 22:34:53 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/401523002/140001
6 years, 5 months ago (2014-07-18 22:37:49 UTC) #16
acolwell GONE FROM CHROMIUM
The CQ bit was unchecked by acolwell@chromium.org
6 years, 5 months ago (2014-07-18 23:22:37 UTC) #17
acolwell GONE FROM CHROMIUM
darin: PTAL since I had to make several content/ & chrome/ changes to make the ...
6 years, 5 months ago (2014-07-23 16:44:24 UTC) #18
darin (slow to review)
https://codereview.chromium.org/401523002/diff/200001/content/common/mime_util.cc File content/common/mime_util.cc (right): https://codereview.chromium.org/401523002/diff/200001/content/common/mime_util.cc#newcode15 content/common/mime_util.cc:15: return net::IsSupportedMimeType(mime_type) || the only concern I have is ...
6 years, 5 months ago (2014-07-24 17:52:53 UTC) #19
Ryan Sleevi
https://codereview.chromium.org/401523002/diff/200001/content/common/mime_util.cc File content/common/mime_util.cc (right): https://codereview.chromium.org/401523002/diff/200001/content/common/mime_util.cc#newcode15 content/common/mime_util.cc:15: return net::IsSupportedMimeType(mime_type) || On 2014/07/24 17:52:53, darin wrote: > ...
6 years, 5 months ago (2014-07-24 18:24:09 UTC) #20
darin (slow to review)
6 years, 5 months ago (2014-07-25 04:45:40 UTC) #21
On Thu, Jul 24, 2014 at 11:24 AM, <rsleevi@chromium.org> wrote:

>
> https://codereview.chromium.org/401523002/diff/200001/
> content/common/mime_util.cc
> File content/common/mime_util.cc (right):
>
> https://codereview.chromium.org/401523002/diff/200001/
> content/common/mime_util.cc#newcode15
> content/common/mime_util.cc:15: return
> net::IsSupportedMimeType(mime_type) ||
> On 2014/07/24 17:52:53, darin wrote:
>
>> the only concern I have is that it could be confusing what version of
>> IsSupportedMimeType one is to call. i would almost prefer some form of
>> dependency injection into net's mime_util. you could imagine pushing
>>
> settings
>
>> into it, or set a delegate method for it to call. that way everyone
>>
> will still
>
>> think the truth of mime type info lives in net/base/mime_util.h.
>>
>
> I do think it's weird to have the truth of mime type info in //net.
> There's really all sorts of lies in it.
>
> For example, if a plugin handles a mime-type, is it supported or not?
> What about a CDM (where some of this is coming up w/r/t //media)?
>
> There's actually only one place in //net it's used, and that's whether
> or not to download something if it wasn't explicitly requested, and if
> and only if it's an explicitly .gz/.tgz file. Which is, well, weird.
>
>

Perhaps the answer is that we should move the entire system out of src/net,
and then use some other means to address the needs there. I'd be OK with
that too. It has always been an awkward fit there. (I think we may have
used it more from src/net at one point in the past.)

-Darin



> https://codereview.chromium.org/401523002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698