Peter Qiu | bf8e36c | 2014-12-03 22:59:45 -0800 | [diff] [blame] | 1 | // Copyright 2014 The Chromium OS 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 "apmanager/dhcp_server_factory.h" |
| 6 | |
| 7 | namespace apmanager { |
| 8 | |
| 9 | namespace { |
| 10 | |
| 11 | base::LazyInstance<DHCPServerFactory> g_dhcp_server_factory |
| 12 | = LAZY_INSTANCE_INITIALIZER; |
| 13 | |
| 14 | } // namespace |
| 15 | |
| 16 | DHCPServerFactory::DHCPServerFactory() {} |
| 17 | DHCPServerFactory::~DHCPServerFactory() {} |
| 18 | |
| 19 | DHCPServerFactory* DHCPServerFactory::GetInstance() { |
| 20 | return g_dhcp_server_factory.Pointer(); |
| 21 | } |
| 22 | |
| 23 | DHCPServer* DHCPServerFactory::CreateDHCPServer( |
| 24 | uint16_t server_addr_index, const std::string& interface_name) { |
| 25 | return new DHCPServer(server_addr_index, interface_name); |
| 26 | } |
| 27 | |
| 28 | } // namespace apmanager |