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

Unified Diff: net/dns/mdns_client.cc

Issue 15733008: Multicast DNS implementation (initial) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mdns_implementation2
Patch Set: Created 7 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: net/dns/mdns_client.cc
diff --git a/net/dns/mdns_client.cc b/net/dns/mdns_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a0fc7aaee8de1187b9a43cddf05d6d7de215fc4e
--- /dev/null
+++ b/net/dns/mdns_client.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/dns/mdns_client.h"
+#include "net/dns/mdns_client_impl.h"
+
+namespace net {
+
+static MDnsClient* g_instance = NULL;
+
+MDnsClient* MDnsClient::GetInstance() {
+ if (!g_instance) {
+ g_instance = new MDnsClientImpl();
+ }
+
+ return g_instance;
+}
+
+void MDnsClient::SetInstance(MDnsClient* instance) {
+ g_instance = instance;
+}
+}

Powered by Google App Engine
This is Rietveld 408576698