diff options
author | vmpstr <vmpstr@chromium.org> | 2016-03-21 13:28:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-21 20:30:28 +0000 |
commit | a34d11324e0767acd94d8754e3a117e072492cf4 (patch) | |
tree | ac723766c79172c76341b45aab9c1914169b4466 /content/browser/media | |
parent | 8a2f463d3726f944f5ec279664b25118fd3ccf3c (diff) | |
download | chromium_src-a34d11324e0767acd94d8754e3a117e072492cf4.zip chromium_src-a34d11324e0767acd94d8754e3a117e072492cf4.tar.gz chromium_src-a34d11324e0767acd94d8754e3a117e072492cf4.tar.bz2 |
Add RetainedRef uses where needed.
This patch adds RetainedRef uses where they are required. These
changes will be required when we remove automatic unwrapping of
scoped_refptrs in Bind.
Please see the bug for more context.
R=tzik@chromium.org, thakis@chromium.org, danakj@chromium.org
BUG=589048
Review URL: https://codereview.chromium.org/1815363002
Cr-Commit-Position: refs/heads/master@{#382371}
Diffstat (limited to 'content/browser/media')
-rw-r--r-- | content/browser/media/capture/web_contents_audio_input_stream.cc | 20 | ||||
-rw-r--r-- | content/browser/media/capture/web_contents_audio_muter.cc | 10 |
2 files changed, 12 insertions, 18 deletions
diff --git a/content/browser/media/capture/web_contents_audio_input_stream.cc b/content/browser/media/capture/web_contents_audio_input_stream.cc index 50051a1..7dd34e8 100644 --- a/content/browser/media/capture/web_contents_audio_input_stream.cc +++ b/content/browser/media/capture/web_contents_audio_input_stream.cc @@ -228,23 +228,19 @@ void WebContentsAudioInputStream::Impl::ReportError() { void WebContentsAudioInputStream::Impl::StartMirroring() { DCHECK(thread_checker_.CalledOnValidThread()); - BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, - base::Bind(&AudioMirroringManager::StartMirroring, - base::Unretained(mirroring_manager_), - make_scoped_refptr(this))); + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, + base::Bind(&AudioMirroringManager::StartMirroring, + base::Unretained(mirroring_manager_), + base::RetainedRef(this))); } void WebContentsAudioInputStream::Impl::StopMirroring() { DCHECK(thread_checker_.CalledOnValidThread()); - BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, - base::Bind(&AudioMirroringManager::StopMirroring, - base::Unretained(mirroring_manager_), - make_scoped_refptr(this))); + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, + base::Bind(&AudioMirroringManager::StopMirroring, + base::Unretained(mirroring_manager_), + base::RetainedRef(this))); } void WebContentsAudioInputStream::Impl::UnmuteWebContentsAudio() { diff --git a/content/browser/media/capture/web_contents_audio_muter.cc b/content/browser/media/capture/web_contents_audio_muter.cc index 82a03fa..7423498 100644 --- a/content/browser/media/capture/web_contents_audio_muter.cc +++ b/content/browser/media/capture/web_contents_audio_muter.cc @@ -133,11 +133,10 @@ void WebContentsAudioMuter::StartMuting() { return; is_muting_ = true; BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, + BrowserThread::IO, FROM_HERE, base::Bind(&AudioMirroringManager::StartMirroring, base::Unretained(AudioMirroringManager::GetInstance()), - destination_)); + base::RetainedRef(destination_))); } void WebContentsAudioMuter::StopMuting() { @@ -146,11 +145,10 @@ void WebContentsAudioMuter::StopMuting() { return; is_muting_ = false; BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, + BrowserThread::IO, FROM_HERE, base::Bind(&AudioMirroringManager::StopMirroring, base::Unretained(AudioMirroringManager::GetInstance()), - destination_)); + base::RetainedRef(destination_))); } } // namespace content |