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

Unified Diff: chrome/browser/extensions/api/mdns/nsd_registry.cc

Issue 22870011: chrome.mdns API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: can listen Created 7 years, 4 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: chrome/browser/extensions/api/mdns/nsd_registry.cc
diff --git a/chrome/browser/extensions/api/mdns/nsd_registry.cc b/chrome/browser/extensions/api/mdns/nsd_registry.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7784b641ec026273f4f8cc8243166a5bc6343dda
--- /dev/null
+++ b/chrome/browser/extensions/api/mdns/nsd_registry.cc
@@ -0,0 +1,26 @@
+// 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 "chrome/browser/extensions/api/mdns/nsd_registry.h"
+
+namespace extensions {
+
+NsdRegistry::NsdRegistry() {
+}
+
+NsdRegistry::~NsdRegistry() {
+}
+
+MDnsService* NsdRegistry::mdns_service() {
+ if (!mdns_service_.get()) {
+ mdns_service_.reset(new MDnsService("TEST", NULL));
+ }
+ return mdns_service_.get();
+}
+
+void NsdRegistry::RegisterMDnsListener(std::string service_name) {
+ mdns_service()->Start();
mark a. foltz 2013/08/23 23:27:23 We should probably enforce the service type whitel
justinlin 2013/08/27 00:09:25 It's already done in mdns_manifest_handler.cc, so
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698