Index: chrome/browser/search/hotword_service_factory.cc |
diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc |
index bbc10b4f1a22d684fc8ae2709d6b1380db2982b6..7b7284e9bc491096bc23afc4057401ca68aea5d4 100644 |
--- a/chrome/browser/search/hotword_service_factory.cc |
+++ b/chrome/browser/search/hotword_service_factory.cc |
@@ -68,45 +68,16 @@ int HotwordServiceFactory::GetCurrentError(BrowserContext* context) { |
return hotword_service->error_message(); |
} |
-// static |
-bool HotwordServiceFactory::IsMicrophoneAvailable() { |
- return GetInstance()->microphone_available(); |
-} |
- |
-// static |
-bool HotwordServiceFactory::IsAudioDeviceStateUpdated() { |
- return GetInstance()->audio_device_state_updated(); |
-} |
- |
HotwordServiceFactory::HotwordServiceFactory() |
: BrowserContextKeyedServiceFactory( |
"HotwordService", |
- BrowserContextDependencyManager::GetInstance()), |
- microphone_available_(false), |
- audio_device_state_updated_(false) { |
+ BrowserContextDependencyManager::GetInstance()) { |
// No dependencies. |
- |
- // Register with the device observer list to update the microphone |
- // availability. |
- BrowserThread::PostTask( |
- BrowserThread::UI, FROM_HERE, |
- base::Bind(&HotwordServiceFactory::InitializeMicrophoneObserver, |
- base::Unretained(this))); |
} |
HotwordServiceFactory::~HotwordServiceFactory() { |
} |
-void HotwordServiceFactory::InitializeMicrophoneObserver() { |
- MediaCaptureDevicesDispatcher::GetInstance()->AddObserver(this); |
-} |
- |
-void HotwordServiceFactory::OnUpdateAudioDevices( |
- const content::MediaStreamDevices& devices) { |
- microphone_available_ = !devices.empty(); |
- audio_device_state_updated_ = true; |
-} |
- |
void HotwordServiceFactory::UpdateMicrophoneState() { |
// In order to trigger the monitor, just call getAudioCaptureDevices. |
content::MediaStreamDevices devices = |