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

Issue 17508005: Minor cleanup to remove the static thread-safe methods on BrowserMainLoop. Initially I thought this… (Closed)

Created:
7 years, 6 months ago by jam
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Minor cleanup to remove the static thread-safe methods on BrowserMainLoop. Initially I thought this would be one getter so it seemed fine, but now it has 3 and more are on the way. Switch to one static getter for this class, and then getters for the member variables. I used dependency injection to allow access to these objects from other threads, which also cleaned up tests a bit. R=scherkus@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207871

Patch Set 1 #

Total comments: 6

Patch Set 2 : nits #

Total comments: 1

Patch Set 3 : revert PostTask change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -142 lines) Patch
M chrome/browser/media/media_capture_devices_dispatcher.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M content/browser/browser_main_loop.h View 2 chunks +12 lines, -6 lines 0 comments Download
M content/browser/browser_main_loop.cc View 2 chunks +6 lines, -14 lines 0 comments Download
M content/browser/media_devices_monitor.cc View 1 2 1 chunk +13 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 3 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host.h View 3 chunks +4 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host.cc View 7 chunks +11 lines, -12 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 3 chunks +2 lines, -9 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.h View 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 5 chunks +12 lines, -11 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host_unittest.cc View 3 chunks +2 lines, -8 lines 0 comments Download
M content/browser/renderer_host/media/web_contents_audio_input_stream.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/web_contents_audio_input_stream.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.h View 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 5 chunks +32 lines, -29 lines 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.h View 3 chunks +9 lines, -1 line 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.cc View 4 chunks +20 lines, -16 lines 0 comments Download
M content/public/browser/media_devices_monitor.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/test/webrtc_audio_device_test.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
jam
7 years, 6 months ago (2013-06-21 00:26:41 UTC) #1
scherkus (not reviewing)
lgtm w/ nits https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc File content/browser/media_devices_monitor.cc (right): https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc#newcode15 content/browser/media_devices_monitor.cc:15: // Post a EnumerateDevices() API to ...
7 years, 6 months ago (2013-06-21 00:42:43 UTC) #2
jam
https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc File content/browser/media_devices_monitor.cc (right): https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc#newcode15 content/browser/media_devices_monitor.cc:15: // Post a EnumerateDevices() API to MSM to start ...
7 years, 6 months ago (2013-06-21 15:38:58 UTC) #3
scherkus (not reviewing)
lgtm+++ https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc File content/browser/media_devices_monitor.cc (right): https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc#newcode15 content/browser/media_devices_monitor.cc:15: // Post a EnumerateDevices() API to MSM to ...
7 years, 6 months ago (2013-06-21 16:18:42 UTC) #4
jam
https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc File content/browser/media_devices_monitor.cc (right): https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc#newcode15 content/browser/media_devices_monitor.cc:15: // Post a EnumerateDevices() API to MSM to start ...
7 years, 6 months ago (2013-06-21 16:49:19 UTC) #5
scherkus (not reviewing)
7 years, 6 months ago (2013-06-21 17:36:55 UTC) #6
even better!
On Jun 21, 2013 9:49 AM, <jam@chromium.org> wrote:

>
> https://codereview.chromium.**org/17508005/diff/1/content/**
>
browser/media_devices_monitor.**cc<https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc>
> File content/browser/media_devices_**monitor.cc (right):
>
> https://codereview.chromium.**org/17508005/diff/1/content/**
>
browser/media_devices_monitor.**cc#newcode15<https://codereview.chromium.org/17508005/diff/1/content/browser/media_devices_monitor.cc#newcode15>
> content/browser/media_devices_**monitor.cc:15: // Post a
> EnumerateDevices() API to MSM to start the monitoring.
> On 2013/06/21 16:18:42, scherkus wrote:
>
>> On 2013/06/21 15:38:58, jam wrote:
>> > On 2013/06/21 00:42:43, scherkus wrote:
>> > > comment is incorrect
>> >
>> > that's what it was before?
>>
>
>  oh I was referring to the "post to start" -- that bit is now
>>
> accomplished below
>
>> where we call PostTask :)
>>
>
> what I meant was that that comment was there before in the posted
> method.. anyways i took out the comment, because it was just documenting
> the function call below and so was useless
>
>
https://codereview.chromium.**org/17508005/<https://codereview.chromium.org/1...
>

Powered by Google App Engine
This is Rietveld 408576698