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

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

Issue 132693025: Add the ability for MDnsListener to actively refresh records (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/dns/mdns_client.h » ('j') | net/dns/mdns_client_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_CACHE_H_ 5 #ifndef NET_DNS_MDNS_CACHE_H_
6 #define NET_DNS_MDNS_CACHE_H_ 6 #define NET_DNS_MDNS_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 unsigned type_; 48 unsigned type_;
49 std::string name_; 49 std::string name_;
50 std::string optional_; 50 std::string optional_;
51 }; 51 };
52 52
53 typedef base::Callback<void(const RecordParsed*)> RecordRemovedCallback; 53 typedef base::Callback<void(const RecordParsed*)> RecordRemovedCallback;
54 54
55 enum UpdateType { 55 enum UpdateType {
56 RecordAdded, 56 RecordAdded,
57 RecordChanged, 57 RecordChanged,
58 RecordRemoved,
58 NoChange 59 NoChange
59 }; 60 };
60 61
61 MDnsCache(); 62 MDnsCache();
62 ~MDnsCache(); 63 ~MDnsCache();
63 64
64 // Return value indicates whether the record was added, changed 65 // Return value indicates whether the record was added, changed
65 // (existed previously with different value) or not changed (existed 66 // (existed previously with different value) or not changed (existed
66 // previously with same value). 67 // previously with same value).
67 UpdateType UpdateDnsRecord(scoped_ptr<const RecordParsed> record); 68 UpdateType UpdateDnsRecord(scoped_ptr<const RecordParsed> record);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 RecordMap mdns_cache_; 111 RecordMap mdns_cache_;
111 112
112 base::Time next_expiration_; 113 base::Time next_expiration_;
113 114
114 DISALLOW_COPY_AND_ASSIGN(MDnsCache); 115 DISALLOW_COPY_AND_ASSIGN(MDnsCache);
115 }; 116 };
116 117
117 } // namespace net 118 } // namespace net
118 119
119 #endif // NET_DNS_MDNS_CACHE_H_ 120 #endif // NET_DNS_MDNS_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | net/dns/mdns_client.h » ('j') | net/dns/mdns_client_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698