mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 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 "shill/ppp_device_factory.h" |
| 6 | |
| 7 | #include "shill/ppp_device.h" |
| 8 | |
| 9 | using std::string; |
| 10 | |
| 11 | namespace shill { |
| 12 | |
| 13 | namespace { |
| 14 | |
| 15 | base::LazyInstance<PPPDeviceFactory> g_ppp_device_factory |
| 16 | = LAZY_INSTANCE_INITIALIZER; |
| 17 | |
| 18 | } // namespace |
| 19 | |
| 20 | PPPDeviceFactory::PPPDeviceFactory() {} |
| 21 | PPPDeviceFactory::~PPPDeviceFactory() {} |
| 22 | |
| 23 | PPPDeviceFactory *PPPDeviceFactory::GetInstance() { |
| 24 | return g_ppp_device_factory.Pointer(); |
| 25 | } |
| 26 | |
| 27 | PPPDevice *PPPDeviceFactory::CreatePPPDevice( |
| 28 | ControlInterface *control, |
| 29 | EventDispatcher *dispatcher, |
| 30 | Metrics *metrics, |
| 31 | Manager *manager, |
| 32 | const string &link_name, |
| 33 | int interface_index) { |
| 34 | return new PPPDevice(control, dispatcher, metrics, manager, link_name, |
| 35 | interface_index); |
| 36 | } |
| 37 | |
| 38 | } // namespace shill |