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

Issue 10855051: Use enum instead of string in MessageLoopFactory::GetMessageLoop* (Closed)

Created:
8 years, 4 months ago by xhwang
Modified:
8 years, 4 months ago
CC:
chromium-reviews, sadrul, jam, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, pam+watch_chromium.org
Visibility:
Public.

Description

Use enum instead of string in MessageLoopFactory::GetMessageLoop* This reinforces that only certain thread/message_loop can be created, which also makes thread/message_loop access easier and more reliable. Also use scoped_refptr<MessageLoopProxy> instead of raw MessageLoop pointer in various places. BUG=none TEST=media_unittest, content_unittest and normal <video> playback. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151204

Patch Set 1 #

Patch Set 2 : Fix webkit support. #

Patch Set 3 : Update player_wtl #

Total comments: 12

Patch Set 4 : Resolve comments. #

Total comments: 11

Patch Set 5 : Resolve comments and fix crash on win_rel. #

Patch Set 6 : Rebase #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -134 lines) Patch
M content/renderer/media/media_stream_impl.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/media/renderer_gpu_video_decoder_factories.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/media/renderer_gpu_video_decoder_factories.cc View 1 2 3 4 5 6 6 chunks +9 lines, -8 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 2 chunks +7 lines, -4 lines 0 comments Download
M media/base/message_loop_factory.h View 1 2 3 1 chunk +13 lines, -16 lines 0 comments Download
M media/base/message_loop_factory.cc View 1 2 3 4 1 chunk +20 lines, -13 lines 0 comments Download
M media/base/pipeline.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M media/base/pipeline.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M media/base/pipeline_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/ffmpeg_audio_decoder.h View 1 2 3 4 3 chunks +11 lines, -4 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 4 5 chunks +7 lines, -6 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder_unittest.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 16 chunks +16 lines, -16 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/ffmpeg_video_decoder.h View 1 2 3 4 2 chunks +9 lines, -5 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 9 chunks +12 lines, -13 lines 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 3 4 2 chunks +7 lines, -2 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 3 chunks +10 lines, -6 lines 0 comments Download
M media/filters/pipeline_integration_test_base.cc View 1 2 3 4 5 3 chunks +7 lines, -5 lines 0 comments Download
M media/filters/video_frame_generator.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/filters/video_frame_generator.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/tools/player_wtl/movie.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M media/tools/player_x11/player_x11.cc View 1 2 3 4 5 3 chunks +4 lines, -4 lines 0 comments Download
M media/tools/seek_tester/seek_tester.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/media/filter_helpers.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M webkit/media/webmediaplayer_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M webkit/support/test_media_stream_client.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
xhwang
Hello scherkus, This is what we discussed before. This is a short term change that ...
8 years, 4 months ago (2012-08-08 17:35:17 UTC) #1
scherkus (not reviewing)
I'm OK with this change as an incremental cleanup CL but we should really, *really* ...
8 years, 4 months ago (2012-08-09 17:13:24 UTC) #2
Ami GONE FROM CHROMIUM
drive-by http://codereview.chromium.org/10855051/diff/5002/content/renderer/media/media_stream_impl.cc File content/renderer/media/media_stream_impl.cc (right): http://codereview.chromium.org/10855051/diff/5002/content/renderer/media/media_stream_impl.cc#newcode507 content/renderer/media/media_stream_impl.cc:507: media::MessageLoopFactory::VIDEO_DECODER), This change makes it so that a ...
8 years, 4 months ago (2012-08-09 17:19:39 UTC) #3
xhwang
+fischman This CL gets larger than I expected. But most changes are duplicate, so it ...
8 years, 4 months ago (2012-08-10 01:04:28 UTC) #4
Ami GONE FROM CHROMIUM
LGTM % nits http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc File media/base/message_loop_factory.cc (right): http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc#newcode53 media/base/message_loop_factory.cc:53: base::Thread* thread = new base::Thread(name.c_str()); I ...
8 years, 4 months ago (2012-08-10 04:38:06 UTC) #5
scherkus (not reviewing)
lgtm w/ nits thanks for going the extra mile :) http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc File media/base/message_loop_factory.cc (right): http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc#newcode53 ...
8 years, 4 months ago (2012-08-10 17:00:09 UTC) #6
xhwang
http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc File media/base/message_loop_factory.cc (right): http://codereview.chromium.org/10855051/diff/1024/media/base/message_loop_factory.cc#newcode53 media/base/message_loop_factory.cc:53: base::Thread* thread = new base::Thread(name.c_str()); On 2012/08/10 04:38:06, Ami ...
8 years, 4 months ago (2012-08-10 19:33:32 UTC) #7
xhwang
Hello brettw, Can you do an OWNERS review on these two files? content/renderer/render_view_impl.cc webkit/support/test_media_stream_client.cc Thanks, ...
8 years, 4 months ago (2012-08-10 19:39:23 UTC) #8
brettw
Those two files LGTM
8 years, 4 months ago (2012-08-10 22:50:23 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/10855051/9003
8 years, 4 months ago (2012-08-11 00:57:14 UTC) #10
commit-bot: I haz the power
Failed to apply patch for content/renderer/render_view_impl.cc: While running patch -p1 --forward --force; patching file content/renderer/render_view_impl.cc ...
8 years, 4 months ago (2012-08-11 00:57:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/10855051/5008
8 years, 4 months ago (2012-08-11 17:22:12 UTC) #12
commit-bot: I haz the power
Failed to apply patch for content/renderer/media/renderer_gpu_video_decoder_factories.cc: While running patch -p1 --forward --force; patching file content/renderer/media/renderer_gpu_video_decoder_factories.cc ...
8 years, 4 months ago (2012-08-12 02:29:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/10855051/6008
8 years, 4 months ago (2012-08-12 06:30:53 UTC) #14
tae420
ส่ท
8 years, 4 months ago (2012-08-12 07:47:59 UTC) #15
commit-bot: I haz the power
List of reviewers changed. tae420@hotmail.com did a drive-by without LGTM'ing!
8 years, 4 months ago (2012-08-12 14:33:40 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/10855051/6008
8 years, 4 months ago (2012-08-12 21:37:05 UTC) #17
commit-bot: I haz the power
8 years, 4 months ago (2012-08-12 22:51:22 UTC) #18
Change committed as 151204

Powered by Google App Engine
This is Rietveld 408576698