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

Side by Side Diff: content/browser/media/capture/audio_mirroring_manager.cc

Issue 2668813002: Remove LazyInstance usage from media/ (Closed)
Patch Set: Comments. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/media/cdm_registry_impl.h » ('j') | media/filters/ffmpeg_glue.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/audio_mirroring_manager.h" 5 #include "content/browser/media/capture/audio_mirroring_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/lazy_instance.h"
12 11
13 namespace content { 12 namespace content {
14 13
15 namespace {
16
17 base::LazyInstance<AudioMirroringManager>::Leaky g_audio_mirroring_manager =
18 LAZY_INSTANCE_INITIALIZER;
19
20 } // namespace
21
22 // static 14 // static
23 AudioMirroringManager* AudioMirroringManager::GetInstance() { 15 AudioMirroringManager* AudioMirroringManager::GetInstance() {
24 return g_audio_mirroring_manager.Pointer(); 16 static AudioMirroringManager* manager = new AudioMirroringManager();
miu 2017/01/31 22:41:50 Dumb question: The memory bots are aware that stat
17 return manager;
25 } 18 }
26 19
27 AudioMirroringManager::AudioMirroringManager() { 20 AudioMirroringManager::AudioMirroringManager() {
28 // Only *after* construction, check that AudioMirroringManager is being 21 // Only *after* construction, check that AudioMirroringManager is being
29 // invoked on the same single thread. 22 // invoked on the same single thread.
30 thread_checker_.DetachFromThread(); 23 thread_checker_.DetachFromThread();
31 } 24 }
32 25
33 AudioMirroringManager::~AudioMirroringManager() {} 26 AudioMirroringManager::~AudioMirroringManager() {}
34 27
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 : source_render_frame(source_frame), 260 : source_render_frame(source_frame),
268 diverter(stream_diverter), 261 diverter(stream_diverter),
269 destination(NULL) {} 262 destination(NULL) {}
270 263
271 AudioMirroringManager::StreamRoutingState::StreamRoutingState( 264 AudioMirroringManager::StreamRoutingState::StreamRoutingState(
272 const StreamRoutingState& other) = default; 265 const StreamRoutingState& other) = default;
273 266
274 AudioMirroringManager::StreamRoutingState::~StreamRoutingState() {} 267 AudioMirroringManager::StreamRoutingState::~StreamRoutingState() {}
275 268
276 } // namespace content 269 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/cdm_registry_impl.h » ('j') | media/filters/ffmpeg_glue.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698