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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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/cert/nss_cert_database.cc ('k') | net/dns/mdns_client_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MDNS_CLIENT_IMPL_H_ 5 #ifndef NET_DNS_MDNS_CLIENT_IMPL_H_
6 #define NET_DNS_MDNS_CLIENT_IMPL_H_ 6 #define NET_DNS_MDNS_CLIENT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Parse the response and alert relevant listeners. 135 // Parse the response and alert relevant listeners.
136 void HandlePacket(DnsResponse* response, int bytes_read) override; 136 void HandlePacket(DnsResponse* response, int bytes_read) override;
137 137
138 void OnConnectionError(int error) override; 138 void OnConnectionError(int error) override;
139 139
140 private: 140 private:
141 FRIEND_TEST_ALL_PREFIXES(MDnsTest, CacheCleanupWithShortTTL); 141 FRIEND_TEST_ALL_PREFIXES(MDnsTest, CacheCleanupWithShortTTL);
142 142
143 typedef std::pair<std::string, uint16> ListenerKey; 143 typedef std::pair<std::string, uint16> ListenerKey;
144 typedef std::map<ListenerKey, ObserverList<MDnsListenerImpl>* > 144 typedef std::map<ListenerKey, base::ObserverList<MDnsListenerImpl>*>
145 ListenerMap; 145 ListenerMap;
146 146
147 // Alert listeners of an update to the cache. 147 // Alert listeners of an update to the cache.
148 void AlertListeners(MDnsCache::UpdateType update_type, 148 void AlertListeners(MDnsCache::UpdateType update_type,
149 const ListenerKey& key, const RecordParsed* record); 149 const ListenerKey& key, const RecordParsed* record);
150 150
151 // Schedule a cache cleanup to a specific time, cancelling other cleanups. 151 // Schedule a cache cleanup to a specific time, cancelling other cleanups.
152 void ScheduleCleanup(base::Time cleanup); 152 void ScheduleCleanup(base::Time cleanup);
153 153
154 // Clean up the cache and schedule a new cleanup. 154 // Clean up the cache and schedule a new cleanup.
155 void DoCleanup(); 155 void DoCleanup();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 MDnsClientImpl* client_; 318 MDnsClientImpl* client_;
319 319
320 bool started_; 320 bool started_;
321 int flags_; 321 int flags_;
322 322
323 DISALLOW_COPY_AND_ASSIGN(MDnsTransactionImpl); 323 DISALLOW_COPY_AND_ASSIGN(MDnsTransactionImpl);
324 }; 324 };
325 325
326 } // namespace net 326 } // namespace net
327 #endif // NET_DNS_MDNS_CLIENT_IMPL_H_ 327 #endif // NET_DNS_MDNS_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « net/cert/nss_cert_database.cc ('k') | net/dns/mdns_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698