Chromium Code Reviews| 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 |