OLD | NEW |
(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 "net/dns/mdns_listener.h" |
| 6 #include "net/dns/mdns_listener_impl.h" |
| 7 |
| 8 namespace net { |
| 9 |
| 10 const char kMDNSMulticastGroupIPv4[] = "224.0.0.251"; |
| 11 const char kMDNSMulticastGroupIPv6[] = "FF02::FB"; |
| 12 |
| 13 static MDnsListenerFactory* g_instance = NULL; |
| 14 |
| 15 MDnsListenerFactory* MDnsListenerFactory::GetInstance() { |
| 16 if (!g_instance) { |
| 17 g_instance = new MDnsListenerFactoryImpl(); |
| 18 } |
| 19 |
| 20 return g_instance; |
| 21 } |
| 22 |
| 23 void MDnsListenerFactory::SetInstance(MDnsListenerFactory* instance) { |
| 24 g_instance = instance; |
| 25 } |
| 26 } |
OLD | NEW |