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

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..557bbabddda4d3be83ae28be33767e7f331526a9
--- /dev/null
+++ b/net/dns/mdns_client.cc
@@ -0,0 +1,24 @@
+// 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"
szym 2013/06/12 21:35:41 nit: add blank line above
Noam Samuel 2013/06/13 01:08:40 Done.
+
+namespace net {
+
+static MDnsClient* g_instance = NULL;
+
+MDnsClient* MDnsClient::GetInstance() {
+ if (!g_instance) {
+ g_instance = new MDnsClientImpl(new MDnsDatagramServerSocketFactoryImpl());
+ }
+
+ return g_instance;
+}
+
+void MDnsClient::SetInstance(MDnsClient* instance) {
+ g_instance = instance;
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698