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

Side by Side 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: address comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/api/mdns/nsd_registry.h"
6
7 namespace extensions {
8
9 NsdRegistry::NsdRegistry(Observer* observer) /*: observer_(observer)*/ {
10 }
11
12 NsdRegistry::~NsdRegistry() {
13 }
14
15 MDnsService* NsdRegistry::mdns_service() {
16 if (!mdns_service_.get()) {
17 mdns_service_.reset(new MDnsService("", NULL));
18 }
19 return mdns_service_.get();
20 }
21
22 void NsdRegistry::RegisterMDnsListener(std::string service_name) {
23 mdns_service()->Start();
24 }
25
26 void NsdRegistry::UnregisterMDnsListener(std::string service_name) {
27 mdns_service()->Stop();
28 }
29
30 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698