blob: 3b9b137ab6b8f84c62ae779909f33a256fd74113 [file] [log] [blame]
Prathmesh Prabhu3e452f82013-04-10 16:31:44 -07001// 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/dns_client_factory.h"
6
7using std::string;
8using std::vector;
9
10namespace shill {
11
12namespace {
13
14base::LazyInstance<DNSClientFactory> g_dns_client_factory
15 = LAZY_INSTANCE_INITIALIZER;
16
17} // namespace
18
19DNSClientFactory::DNSClientFactory() {}
20DNSClientFactory::~DNSClientFactory() {}
21
22DNSClientFactory *DNSClientFactory::GetInstance() {
23 return g_dns_client_factory.Pointer();
24}
25
26DNSClient *DNSClientFactory::CreateDNSClient(
27 IPAddress::Family family,
28 const string &interface_name,
29 const vector<string> &dns_servers,
30 int timeout_ms,
31 EventDispatcher *dispatcher,
32 const DNSClient::ClientCallback &callback) {
33 return new DNSClient(family,
34 interface_name,
35 dns_servers,
36 timeout_ms,
37 dispatcher,
38 callback);
39}
40
41} // namespace shill