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

Unified Diff: media/audio/audio_manager.cc

Issue 684983004: Move LazyInstance initializers out of function scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_video
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | media/mojo/services/renderer_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager.cc
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 03eeb171d703c545de58b4631d4e3aac1ce00b77..6d5d70d087c204d29df1714536b18e032ccd2374 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -14,6 +14,8 @@
namespace media {
namespace {
AudioManager* g_last_created = NULL;
+static base::LazyInstance<FakeAudioLogFactory>::Leaky g_fake_log_factory =
+ LAZY_INSTANCE_INITIALIZER;
}
// Forward declaration of the platform specific AudioManager factory function.
@@ -35,9 +37,7 @@ AudioManager* AudioManager::Create(AudioLogFactory* audio_log_factory) {
// static
AudioManager* AudioManager::CreateForTesting() {
- static base::LazyInstance<FakeAudioLogFactory>::Leaky fake_log_factory =
- LAZY_INSTANCE_INITIALIZER;
- return Create(fake_log_factory.Pointer());
+ return Create(g_fake_log_factory.Pointer());
}
// static
« no previous file with comments | « no previous file | media/mojo/services/renderer_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698