| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |