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

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

Issue 1505353007: Disable enumeration caching for output devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_output_device_enumerator.cc
diff --git a/content/browser/renderer_host/media/audio_output_device_enumerator.cc b/content/browser/renderer_host/media/audio_output_device_enumerator.cc
index 13f875f64a7141d07dea5cc8d293e872881a8c2c..70a432065ce0df10c240b57049046ad2bd2bf125 100644
--- a/content/browser/renderer_host/media/audio_output_device_enumerator.cc
+++ b/content/browser/renderer_host/media/audio_output_device_enumerator.cc
@@ -91,6 +91,11 @@ void AudioOutputDeviceEnumerator::SetCachePolicy(CachePolicy policy) {
cache_policy_ = policy;
}
+bool AudioOutputDeviceEnumerator::IsCacheEnabled() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return cache_policy_ != CACHE_POLICY_NO_CACHING;
+}
+
void AudioOutputDeviceEnumerator::DoEnumerateDevices() {
DCHECK(thread_checker_.CalledOnValidThread());
is_enumeration_ongoing_ = true;

Powered by Google App Engine
This is Rietveld 408576698