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

Issue 7649016: Removing singleton property of MediaStreamManager and creating thread first when needed. (Closed)

Created:
9 years, 4 months ago by mflodman_chromium_OOO
Modified:
9 years, 3 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, Paweł Hajdan Jr., acolwell+watch_chromium.org, annacc+watch_chromium.org, joi+watch-content_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), wjia(left Chromium), no longer working on chromium
Visibility:
Public.

Description

Removing singleton property of MediaStreamManager and creating thread first when needed. BUG=92125 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101063

Patch Set 1 #

Total comments: 16

Patch Set 2 : Changes based on review by willchan and wjia. #

Patch Set 3 : Reverted parts of previous upload. #

Total comments: 2

Patch Set 4 : Use VideoCaptureManager, instead of ResourceContext, in VideoCaptureController. #

Total comments: 4

Patch Set 5 : Changing unit tests based on review by scherkus. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -90 lines) Patch
M chrome/browser/profiles/profile_io_data.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/browser_render_process_host.cc View 2 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host.h View 2 3 chunks +8 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host.cc View 2 1 chunk +6 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 3 4 6 chunks +58 lines, -16 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 4 chunks +7 lines, -12 lines 1 comment Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 7 chunks +16 lines, -25 lines 2 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 2 3 2 chunks +11 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 3 chunks +11 lines, -13 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.h View 2 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host_unittest.cc View 1 2 3 4 7 chunks +32 lines, -11 lines 0 comments Download
M content/browser/resource_context.h View 3 chunks +8 lines, -0 lines 0 comments Download
M content/browser/resource_context.cc View 1 2 chunks +15 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
scherkus (not reviewing)
drive by but agree w/ jam creation looks good! http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode29 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:29: ...
9 years, 4 months ago (2011-08-16 19:24:09 UTC) #1
willchan no longer on Chromium
http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/media/media_stream_manager.cc#newcode365 content/browser/renderer_host/media/media_stream_manager.cc:365: delete device_settings_; What do you think about using scoped_ptr ...
9 years, 4 months ago (2011-08-17 19:55:19 UTC) #2
wjia(left Chromium)
http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/browser_render_process_host.cc File content/browser/renderer_host/browser_render_process_host.cc (right): http://codereview.chromium.org/7649016/diff/1/content/browser/renderer_host/browser_render_process_host.cc#newcode363 content/browser/renderer_host/browser_render_process_host.cc:363: new VideoCaptureHost(&browser_context()->GetResourceContext())); do you need content::ResourceContext or just media_stream::MediaStreamManager ...
9 years, 4 months ago (2011-08-17 21:13:54 UTC) #3
jam
non media content files lgtm
9 years, 4 months ago (2011-08-18 00:55:19 UTC) #4
mflodman_chromium_OOO
New patch based on review, main changes: - Replaced scoped_refptr with scoped_ptr in ProfileIOData. - ...
9 years, 4 months ago (2011-08-19 11:07:09 UTC) #5
mflodman_chromium_OOO
I was too quick on uploading the previous patch and reverted the part changing that ...
9 years, 4 months ago (2011-08-19 12:31:51 UTC) #6
wjia(left Chromium)
It appears that ResourceContext can be accessed only on IO thread. So it's good to ...
9 years, 4 months ago (2011-08-19 18:09:54 UTC) #7
mflodman_chromium_OOO
Changed so VideoCaptureController ctor gets VideoCaptureManager* instead of ResourceContext*. http://codereview.chromium.org/7649016/diff/17002/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): http://codereview.chromium.org/7649016/diff/17002/content/browser/renderer_host/media/video_capture_controller.cc#newcode162 content/browser/renderer_host/media/video_capture_controller.cc:162: ...
9 years, 4 months ago (2011-08-21 19:15:24 UTC) #8
wjia(left Chromium)
lgtm.
9 years, 4 months ago (2011-08-21 22:41:00 UTC) #9
scherkus (not reviewing)
I've got a question about the Mock*ResourceContext classes but rest is LGTM http://codereview.chromium.org/7649016/diff/20001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc ...
9 years, 4 months ago (2011-08-23 19:33:26 UTC) #10
mflodman_chromium_OOO
Changed unit tests based on feedback by scherkus. http://codereview.chromium.org/7649016/diff/20001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): http://codereview.chromium.org/7649016/diff/20001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode29 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:29: class ...
9 years, 4 months ago (2011-08-24 14:27:24 UTC) #11
scherkus (not reviewing)
thanks!
9 years, 4 months ago (2011-08-24 14:43:40 UTC) #12
Elliot Glaysher
I am going to cautiously lgtm the profile_io_data change. willchan wrote that and would be ...
9 years, 4 months ago (2011-08-25 19:22:59 UTC) #13
mflodman_chromium_OOO
Thanks! I'll commit the CL, but of course listen to feedback from willchan and make ...
9 years, 4 months ago (2011-08-25 19:34:56 UTC) #14
willchan no longer on Chromium
9 years, 4 months ago (2011-08-26 17:10:13 UTC) #15
LGTM!

http://codereview.chromium.org/7649016/diff/25002/content/browser/renderer_ho...
File content/browser/renderer_host/media/media_stream_manager.cc (right):

http://codereview.chromium.org/7649016/diff/25002/content/browser/renderer_ho...
content/browser/renderer_host/media/media_stream_manager.cc:9: #include
"base/lazy_instance.h"
Delete

http://codereview.chromium.org/7649016/diff/25002/content/browser/renderer_ho...
content/browser/renderer_host/media/media_stream_manager.cc:49: :
device_settings_(new MediaStreamDeviceSettings(this)),
Don't you need ALLOW_THIS_IN_INITIALIZER_LIST and compiler_specific.h?

http://codereview.chromium.org/7649016/diff/25002/content/browser/renderer_ho...
File content/browser/renderer_host/media/media_stream_manager.h (right):

http://codereview.chromium.org/7649016/diff/25002/content/browser/renderer_ho...
content/browser/renderer_host/media/media_stream_manager.h:109:
MediaStreamProvider* GetDeviceManager(MediaStreamType stream_type);
My personal style pref is to keep this const and make this logically const by
using mutable.

Powered by Google App Engine
This is Rietveld 408576698