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_client.h" |
| 6 |
| 7 #include "net/dns/mdns_client_impl.h" |
| 8 |
| 9 namespace net { |
| 10 |
| 11 static MDnsClient* g_instance = NULL; |
| 12 |
| 13 MDnsClient* MDnsClient::GetInstance() { |
| 14 if (!g_instance) { |
| 15 g_instance = |
| 16 new MDnsClientImpl(MDnsConnection::SocketFactory::CreateDefault()); |
| 17 } |
| 18 |
| 19 return g_instance; |
| 20 } |
| 21 |
| 22 void MDnsClient::SetInstance(MDnsClient* instance) { |
| 23 g_instance = instance; |
| 24 } |
| 25 |
| 26 } // namespace net |
OLD | NEW |