| Index: chrome/browser/speech/speech_input_manager.cc
|
| diff --git a/chrome/browser/speech/speech_input_manager.cc b/chrome/browser/speech/speech_input_manager.cc
|
| index 6ea8d19a4543361749fa2ed05a3619e82b201ccd..181786b548cd8166166c77035392629f7783a6f6 100644
|
| --- a/chrome/browser/speech/speech_input_manager.cc
|
| +++ b/chrome/browser/speech/speech_input_manager.cc
|
| @@ -10,7 +10,7 @@
|
| #include "app/l10n_util.h"
|
| #include "base/lock.h"
|
| #include "base/ref_counted.h"
|
| -#include "base/singleton.h"
|
| +#include "base/lazy_instance.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/browser_thread.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| @@ -124,7 +124,7 @@ class SpeechInputManagerImpl : public SpeechInputManager,
|
| };
|
|
|
| // Private constructor to enforce singleton.
|
| - friend struct DefaultSingletonTraits<SpeechInputManagerImpl>;
|
| + friend struct base::DefaultLazyInstanceTraits<SpeechInputManagerImpl>;
|
| SpeechInputManagerImpl();
|
| virtual ~SpeechInputManagerImpl();
|
|
|
| @@ -144,8 +144,11 @@ class SpeechInputManagerImpl : public SpeechInputManager,
|
| scoped_refptr<HardwareInfo> hardware_info_;
|
| };
|
|
|
| +static ::base::LazyInstance<SpeechInputManagerImpl> g_speech_input_manager_impl(
|
| + base::LINKER_INITIALIZED);
|
| +
|
| SpeechInputManager* SpeechInputManager::Get() {
|
| - return Singleton<SpeechInputManagerImpl>::get();
|
| + return g_speech_input_manager_impl.Pointer();
|
| }
|
|
|
| SpeechInputManagerImpl::SpeechInputManagerImpl()
|
|
|