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

Unified Diff: content/browser/media/webrtc/webrtc_browsertest.cc

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply the lazy initialization only to Android Created 4 years, 6 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
Index: content/browser/media/webrtc/webrtc_browsertest.cc
diff --git a/content/browser/media/webrtc/webrtc_browsertest.cc b/content/browser/media/webrtc/webrtc_browsertest.cc
index 9036deea75c1802af6b11fad02bd75d141df6945..ef61f34d907543e5cd16bc621ed2b363768f8dfb 100644
--- a/content/browser/media/webrtc/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc/webrtc_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/files/file_util.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
+#include "content/browser/browser_main_loop.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/webrtc_ip_handling_policy.h"
@@ -39,6 +40,10 @@ class MAYBE_WebRtcBrowserTest : public WebRtcContentBrowserTest {
AppendUseFakeUIForMediaStreamFlag();
}
+ void SetUpOnMainThread() override {
+ BrowserMainLoop::GetInstance()->InitializeMediaComponentsIfNeeded();
+ }
+
protected:
// Convenience function since most peerconnection-call.html tests just load
// the page, kick off some javascript and wait for the title to change to OK.

Powered by Google App Engine
This is Rietveld 408576698