| 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 "chrome/browser/local_discovery/service_discovery_client.h" |
| 6 #include "chrome/browser/local_discovery/service_discovery_client_impl.h" |
| 7 |
| 8 namespace local_discovery { |
| 9 static ServiceDiscoveryClient* g_instance = NULL; |
| 10 |
| 11 ServiceDiscoveryClient* ServiceDiscoveryClient::GetInstance() { |
| 12 if (!g_instance) { |
| 13 g_instance = new ServiceDiscoveryClientImpl(); |
| 14 } |
| 15 |
| 16 return g_instance; |
| 17 } |
| 18 |
| 19 void ServiceDiscoveryClient::SetInstance(ServiceDiscoveryClient* instance) { |
| 20 g_instance = instance; |
| 21 } |
| 22 |
| 23 } // namespace local_discovery |
| OLD | NEW |