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

Side by Side Diff: net/dns/dns_config_service.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/base/host_resolver_impl_unittest.cc ('k') | net/dns/dns_config_service.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_H_ 5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_H_
6 #define NET_DNS_DNS_CONFIG_SERVICE_H_ 6 #define NET_DNS_DNS_CONFIG_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Enable EDNS0 extensions. 61 // Enable EDNS0 extensions.
62 bool edns0; 62 bool edns0;
63 }; 63 };
64 64
65 65
66 // Service for watching when the system DNS settings have changed. 66 // Service for watching when the system DNS settings have changed.
67 // Depending on the platform, watches files in /etc/ or Windows registry. 67 // Depending on the platform, watches files in /etc/ or Windows registry.
68 class NET_EXPORT_PRIVATE DnsConfigService 68 class NET_EXPORT_PRIVATE DnsConfigService
69 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 69 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
70 public: 70 public:
71 // Callback interface for the client. The observer is called on the same 71 // Callback interface for the client, called on the same thread as Watch().
72 // thread as Watch(). Observer must outlive the service.
73 typedef base::Callback<void(const DnsConfig& config)> CallbackType; 72 typedef base::Callback<void(const DnsConfig& config)> CallbackType;
74 73
75 // Creates the platform-specific DnsConfigService. 74 // Creates the platform-specific DnsConfigService.
76 static scoped_ptr<DnsConfigService> CreateSystemService(); 75 static scoped_ptr<DnsConfigService> CreateSystemService();
77 76
78 DnsConfigService(); 77 DnsConfigService();
79 virtual ~DnsConfigService(); 78 virtual ~DnsConfigService();
80 79
81 // Immediately starts watching system configuration for changes and attempts 80 // Immediately starts watching system configuration for changes and attempts
82 // to read the configuration. For some platform implementations, the current 81 // to read the configuration. For some platform implementations, the current
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::OneShotTimer<DnsConfigService> timer_; 120 base::OneShotTimer<DnsConfigService> timer_;
122 121
123 private: 122 private:
124 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); 123 DISALLOW_COPY_AND_ASSIGN(DnsConfigService);
125 }; 124 };
126 125
127 126
128 } // namespace net 127 } // namespace net
129 128
130 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ 129 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_
OLDNEW
« no previous file with comments | « net/base/host_resolver_impl_unittest.cc ('k') | net/dns/dns_config_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698