Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: net/dns/dns_config_service_win.h

Issue 9721002: [net/dns] Removes locking from DnsConfigServiceWin and adds local computer name. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move lowercasing to ServeFromHosts, add test. Reorganize OnHostsRead. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/dns/dns_config_service.cc ('k') | net/dns/dns_config_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ 5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
6 #define NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ 6 #define NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 // The sole purpose of dns_config_service_win.h is for unittests so we just 9 // The sole purpose of dns_config_service_win.h is for unittests so we just
10 // include these headers here. 10 // include these headers here.
(...skipping 30 matching lines...) Expand all
41 class NET_EXPORT_PRIVATE DnsConfigServiceWin 41 class NET_EXPORT_PRIVATE DnsConfigServiceWin
42 : NON_EXPORTED_BASE(public DnsConfigService) { 42 : NON_EXPORTED_BASE(public DnsConfigService) {
43 public: 43 public:
44 DnsConfigServiceWin(); 44 DnsConfigServiceWin();
45 virtual ~DnsConfigServiceWin(); 45 virtual ~DnsConfigServiceWin();
46 46
47 virtual void Watch(const CallbackType& callback) OVERRIDE; 47 virtual void Watch(const CallbackType& callback) OVERRIDE;
48 48
49 private: 49 private:
50 class ConfigReader; 50 class ConfigReader;
51 51 class HostsReader;
52 void OnHostsChanged(bool succeeded);
53 52
54 scoped_refptr<ConfigReader> config_reader_; 53 scoped_refptr<ConfigReader> config_reader_;
55 scoped_ptr<FilePathWatcherWrapper> hosts_watcher_; 54 scoped_refptr<HostsReader> hosts_reader_;
56 scoped_refptr<SerialWorker> hosts_reader_;
57 55
58 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin); 56 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin);
59 }; 57 };
60 58
61 // All relevant settings read from registry and IP Helper. This isolates our 59 // All relevant settings read from registry and IP Helper. This isolates our
62 // logic from system calls and is exposed for unit tests. Keep it an aggregate 60 // logic from system calls and is exposed for unit tests. Keep it an aggregate
63 // struct for easy initialization. 61 // struct for easy initialization.
64 struct NET_EXPORT_PRIVATE DnsSystemSettings { 62 struct NET_EXPORT_PRIVATE DnsSystemSettings {
65 // The |set| flag distinguishes between empty and unset values. 63 // The |set| flag distinguishes between empty and unset values.
66 struct RegString { 64 struct RegString {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Fills in |dns_config| from |settings|. Exposed for tests. 110 // Fills in |dns_config| from |settings|. Exposed for tests.
113 bool NET_EXPORT_PRIVATE ConvertSettingsToDnsConfig( 111 bool NET_EXPORT_PRIVATE ConvertSettingsToDnsConfig(
114 const DnsSystemSettings& settings, DnsConfig* dns_config); 112 const DnsSystemSettings& settings, DnsConfig* dns_config);
115 113
116 } // namespace internal 114 } // namespace internal
117 115
118 } // namespace net 116 } // namespace net
119 117
120 #endif // NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ 118 #endif // NET_DNS_DNS_CONFIG_SERVICE_WIN_H_
121 119
OLDNEW
« no previous file with comments | « net/dns/dns_config_service.cc ('k') | net/dns/dns_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698