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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 2869733005: Convert some audio code to OnceCallback. (Closed)
Patch Set: Rebase, comments on unretained. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/audio_renderer_host_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 1f934cf5297022185924c1384aabb6e6f7879366..ed064522cc561125e140ca63b3061e36b3d1dbe2 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -58,11 +58,11 @@ const char kInvalidDeviceId[] = "invalid-device-id";
void ValidateRenderFrameId(int render_process_id,
int render_frame_id,
- const base::Callback<void(bool)>& callback) {
+ base::OnceCallback<void(bool)> callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
const bool frame_exists = (render_frame_id == kRenderFrameId);
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(callback, frame_exists));
+ base::BindOnce(std::move(callback), frame_exists));
}
@@ -98,7 +98,7 @@ class MockRenderProcessHostWithSignaling : public MockRenderProcessHost {
class FakeAudioManagerWithAssociations : public media::FakeAudioManager {
public:
- FakeAudioManagerWithAssociations(media::AudioLogFactory* factory)
+ explicit FakeAudioManagerWithAssociations(media::AudioLogFactory* factory)
: FakeAudioManager(base::MakeUnique<media::TestAudioThread>(), factory) {}
void CreateDeviceAssociation(const std::string& input_device_id,

Powered by Google App Engine
This is Rietveld 408576698