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

Unified Diff: content/browser/media/webrtc_internals.cc

Issue 575283004: Change WebRTCInternals::GetInstance() to use a leaky LazyInstance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change WebRTCInternals::GetInstance to use LazyInstance. Created 6 years, 3 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 | « content/browser/media/webrtc_internals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc_internals.cc
diff --git a/content/browser/media/webrtc_internals.cc b/content/browser/media/webrtc_internals.cc
index 92ca83cc2f4b393dc81e0123d6a648cb10ddae7a..d8a0314466c3930839e820a09045db574754536c 100644
--- a/content/browser/media/webrtc_internals.cc
+++ b/content/browser/media/webrtc_internals.cc
@@ -22,6 +22,10 @@ using std::string;
namespace content {
namespace {
+
+static base::LazyInstance<WebRTCInternals>::Leaky g_webrtc_internals =
+ LAZY_INSTANCE_INITIALIZER;
+
// Makes sure that |dict| has a ListValue under path "log".
static base::ListValue* EnsureLogList(base::DictionaryValue* dict) {
base::ListValue* log = NULL;
@@ -61,7 +65,7 @@ WebRTCInternals::~WebRTCInternals() {
}
WebRTCInternals* WebRTCInternals::GetInstance() {
- return Singleton<WebRTCInternals>::get();
+ return g_webrtc_internals.Pointer();
}
void WebRTCInternals::OnAddPeerConnection(int render_process_id,
« no previous file with comments | « content/browser/media/webrtc_internals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698