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

Issue 2655413004: Strip out stream counting from AudioRendererHost. (Closed)

Created:
3 years, 10 months ago by DaleCurtis
Modified:
3 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, miu+watch_chromium.org, nasko+codewatch_chromium.org, posciak+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Strip out stream counting from AudioRendererHost. This allows us to prepare the way for the mojo audio subsystem by moving out pieces from the AudioRendererHost. We already have a AudioStreamMonitor delivering notifications to WebContents, so now it just also delivers a notification to the RenderProcessHostImpl when a stream is started. RenderProcessHostImpl tracks the current stream count per process and uses this for background calculations. Old UMA have been set as obsolete and the AudioStreamsTracker class is now unused, so removed. BUG=670383 TEST=new browsertest CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2655413004 Cr-Commit-Position: refs/heads/master@{#449228} Committed: https://chromium.googlesource.com/chromium/src/+/36218827374706794314c50713b5614a78562e54

Patch Set 1 #

Total comments: 14

Patch Set 2 : Delete UMA, AudioStreamTracker. Add browser test. #

Patch Set 3 : Fix all teh tests. #

Total comments: 6

Patch Set 4 : Add DCHECKs. #

Patch Set 5 : Add moar DCHECKs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -361 lines) Patch
M content/browser/media/audio_stream_monitor.cc View 1 2 3 4 7 chunks +53 lines, -43 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate_impl.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate_impl_unittest.cc View 1 2 5 chunks +0 lines, -23 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 3 chunks +0 lines, -13 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 8 chunks +0 lines, -71 lines 0 comments Download
M content/browser/renderer_host/render_process_host_browsertest.cc View 1 2 3 chunks +85 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 chunks +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M media/audio/BUILD.gn View 1 2 chunks +0 lines, -3 lines 0 comments Download
M media/audio/audio_streams_tracker.h View 1 1 chunk +0 lines, -51 lines 0 comments Download
M media/audio/audio_streams_tracker.cc View 1 1 chunk +0 lines, -44 lines 0 comments Download
D media/audio/audio_streams_tracker_unittest.cc View 1 1 chunk +0 lines, -101 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (21 generated)
DaleCurtis
If content/ folk would prefer we iterate over WebContents for this information that's fine with ...
3 years, 10 months ago (2017-01-27 20:30:32 UTC) #3
Max Morin
lgtm % comment https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc#newcode1579 content/browser/renderer_host/render_process_host_impl.cc:1579: UpdateProcessPriority(); It probably makes sense to ...
3 years, 10 months ago (2017-01-30 11:47:08 UTC) #4
o1ka
This looks really nice. I got lost figuring out relations between RendererPocessHost and WebContents. This ...
3 years, 10 months ago (2017-01-30 12:19:13 UTC) #5
DaleCurtis
+ncarter for content/ review and olka@'s question: "Can a RenderProcessHostImpl exist without a WebContents?" https://codereview.chromium.org/2655413004/diff/1/content/browser/media/audio_stream_monitor.cc ...
3 years, 10 months ago (2017-01-30 21:12:19 UTC) #7
ncarter (slow)
https://codereview.chromium.org/2655413004/diff/1/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2655413004/diff/1/content/browser/media/audio_stream_monitor.cc#newcode90 content/browser/media/audio_stream_monitor.cc:90: RenderProcessHostImpl* render_process_host = On 2017/01/30 21:12:19, DaleCurtis wrote: > ...
3 years, 10 months ago (2017-01-31 18:33:12 UTC) #9
ncarter (slow)
Also, as a meta-comment, moving audio-specific stuff into RPH seems like the wrong direction. I ...
3 years, 10 months ago (2017-01-31 18:35:19 UTC) #10
DaleCurtis
https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc#newcode800 content/browser/renderer_host/render_process_host_impl.cc:800: g_audio_streams_tracker.Get().max_stream_count(), 1, 100, 101); On 2017/01/31 at 18:33:12, ncarter ...
3 years, 10 months ago (2017-01-31 22:08:31 UTC) #12
DaleCurtis
Ping grunell
3 years, 10 months ago (2017-02-03 00:43:21 UTC) #13
Henrik Grunell
https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2655413004/diff/1/content/browser/renderer_host/render_process_host_impl.cc#newcode800 content/browser/renderer_host/render_process_host_impl.cc:800: g_audio_streams_tracker.Get().max_stream_count(), 1, 100, 101); On 2017/01/31 22:08:31, DaleCurtis wrote: ...
3 years, 10 months ago (2017-02-03 08:52:20 UTC) #14
Max Morin
On 2017/02/03 08:52:20, Henrik Grunell wrote: > Olga and Max: are they useful in the ...
3 years, 10 months ago (2017-02-03 08:53:21 UTC) #15
DaleCurtis
Okay this is all fixed up with a test now and removes even more code ...
3 years, 10 months ago (2017-02-06 22:19:03 UTC) #17
Henrik Grunell
LGTM for removal of the two metrics and the AudioStreamsTracker.
3 years, 10 months ago (2017-02-07 06:56:28 UTC) #26
o1ka
\o/ lgtm https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc#newcode210 content/browser/media/audio_stream_monitor.cc:210: if (--active_streams_ == 0) { DCHECK(active_streams_ > ...
3 years, 10 months ago (2017-02-07 09:38:02 UTC) #27
Max Morin
Still lgtm, just a small comment. https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc#newcode132 content/browser/media/audio_stream_monitor.cc:132: DCHECK(!read_power_callback.is_null()); DCHECK that ...
3 years, 10 months ago (2017-02-07 11:51:20 UTC) #28
DaleCurtis
DCHECKs added. nick@ PTAL. +rkaplow for histograms.xml obsoletion. https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc#newcode210 content/browser/media/audio_stream_monitor.cc:210: if ...
3 years, 10 months ago (2017-02-07 22:09:17 UTC) #31
rkaplow
lgtm
3 years, 10 months ago (2017-02-08 15:28:28 UTC) #32
DaleCurtis
nick=>avi due to OOO. https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2655413004/diff/40001/content/browser/media/audio_stream_monitor.cc#newcode132 content/browser/media/audio_stream_monitor.cc:132: DCHECK(!read_power_callback.is_null()); On 2017/02/07 at 11:51:19, ...
3 years, 10 months ago (2017-02-08 23:15:10 UTC) #34
Avi (use Gerrit)
lgtm Looks reasonable.
3 years, 10 months ago (2017-02-09 02:47:39 UTC) #35
DaleCurtis
Thanks for review!
3 years, 10 months ago (2017-02-09 03:03:39 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2655413004/80001
3 years, 10 months ago (2017-02-09 03:04:12 UTC) #39
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 06:36:06 UTC) #42
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/36218827374706794314c50713b5...

Powered by Google App Engine
This is Rietveld 408576698