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

Issue 2558303004: Cleanup AudioDeviceThread to avoid accidental misuse. (Closed)

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

Description

Cleanup AudioDeviceThread to avoid accidental misuse. The code as written returned the current task runner whenever AudioDeviceThread::GetTaskRunner() was called, when actually what we want is for it to always be bound to the constructed thread. This isn't an issue given that we didn't expose AudioDeviceThread outside of BrowserMainLoop, but this prevents any future misuse and cleans up some style issues. Note: This also renames AudioDeviceThread to AudioManagerThread since we already have an AudioDeviceThread in the renderer. BUG=656923 TEST=none Committed: https://crrev.com/d8cd11c786e0173afcc7031d85aa3cec75376b6c Cr-Commit-Position: refs/heads/master@{#438301}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Grammar. #

Patch Set 3 : Rename to AudioManagerThread. Fix tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -91 lines) Patch
M content/browser/BUILD.gn View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/audio_device_thread.h View 1 2 1 chunk +0 lines, -36 lines 0 comments Download
M content/browser/audio_device_thread.cc View 1 2 1 chunk +0 lines, -28 lines 0 comments Download
A content/browser/audio_manager_thread.h View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
A + content/browser/audio_manager_thread.cc View 1 2 1 chunk +13 lines, -12 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_authorization_handler_unittest.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate_unittest.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (10 generated)
DaleCurtis
Noticed this while digging through surrounding code. Again, no issue, but the way it's written ...
4 years ago (2016-12-13 00:29:35 UTC) #2
Avi (use Gerrit)
lgtm grammar nits https://codereview.chromium.org/2558303004/diff/1/content/browser/audio_device_thread.cc File content/browser/audio_device_thread.cc (right): https://codereview.chromium.org/2558303004/diff/1/content/browser/audio_device_thread.cc#newcode19 content/browser/audio_device_thread.cc:19: // On Mac audio task runner ...
4 years ago (2016-12-13 01:36:11 UTC) #3
DaleCurtis
Thanks for review! I'll probably send another CL tomorrow to rename this, since we already ...
4 years ago (2016-12-13 01:55:39 UTC) #4
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/2558303004/20001
4 years ago (2016-12-13 01:56:42 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/276775)
4 years ago (2016-12-13 02:07:43 UTC) #9
Max Morin
LGTM, thanks for the cleanup
4 years ago (2016-12-13 07:44:33 UTC) #10
DaleCurtis
Went ahead and renamed in this CL since I needed to fix up a few ...
4 years ago (2016-12-13 19:29:18 UTC) #12
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/2558303004/40001
4 years ago (2016-12-13 19:29:55 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-13 21:57:14 UTC) #18
commit-bot: I haz the power
4 years ago (2016-12-13 22:00:52 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d8cd11c786e0173afcc7031d85aa3cec75376b6c
Cr-Commit-Position: refs/heads/master@{#438301}

Powered by Google App Engine
This is Rietveld 408576698