blob: 97dcf6c5dae554bb05ebb6c261bbe76a15f5c9fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright (c) 2011 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.
#ifndef NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
#define NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
#pragma once
#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "net/base/net_export.h"
#include "net/dns/dns_config_service.h"
namespace net {
class WatchingFileReader;
class NET_EXPORT_PRIVATE DnsConfigServiceWin
: NON_EXPORTED_BASE(public DnsConfigService) {
public:
DnsConfigServiceWin();
virtual ~DnsConfigServiceWin();
virtual void Watch() OVERRIDE;
private:
class ConfigReader;
scoped_refptr<ConfigReader> config_reader_;
scoped_ptr<WatchingFileReader> hosts_watcher_;
DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin);
};
// Parses |value| as search list (comma-delimited list of domain names) from
// a registry key and stores it in |out|. Returns true on success.
// Empty entries (e.g., "chromium.org,,org") terminate the list.
// Non-ascii hostnames are converted to punycode.
bool NET_EXPORT_PRIVATE ParseSearchList(const string16& value,
std::vector<std::string>* out);
} // namespace net
#endif // NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
|