Index: net/dns/mdns_client_impl.h |
diff --git a/net/dns/mdns_client_impl.h b/net/dns/mdns_client_impl.h |
index f75598560ab43c0634f656c109630daee1b6e2b4..764d433d77249f598a714131c96b2386c905cc01 100644 |
--- a/net/dns/mdns_client_impl.h |
+++ b/net/dns/mdns_client_impl.h |
@@ -133,7 +133,7 @@ class NET_EXPORT_PRIVATE MDnsClientImpl : public MDnsClient { |
ListenerMap; |
// Alert listeners of an update to the cache. |
- void AlertListeners(MDnsListener::UpdateType update_type, |
+ void AlertListeners(MDnsCache::UpdateType update_type, |
const ListenerKey& key, const RecordParsed* record); |
// Schedule a cache cleanup to a specific time, cancelling other cleanups. |
@@ -204,6 +204,9 @@ class MDnsListenerImpl : public MDnsListener, |
// MDnsListener implementation: |
virtual bool Start() OVERRIDE; |
+ // Actively refresh any received records. |
+ virtual void SetActiveRefresh(bool active_refresh) OVERRIDE; |
+ |
virtual const std::string& GetName() const OVERRIDE; |
virtual uint16 GetType() const OVERRIDE; |
@@ -211,19 +214,27 @@ class MDnsListenerImpl : public MDnsListener, |
MDnsListener::Delegate* delegate() { return delegate_; } |
// Alert the delegate of a record update. |
- void AlertDelegate(MDnsListener::UpdateType update_type, |
- const RecordParsed* record_parsed); |
+ void HandleRecordUpdate(MDnsCache::UpdateType update_type, |
+ const RecordParsed* record_parsed); |
// Alert the delegate of the existence of an Nsec record. |
void AlertNsecRecord(); |
private: |
+ void ScheduleNextRefresh(); |
+ void DoRefresh(); |
+ |
uint16 rrtype_; |
std::string name_; |
MDnsClientImpl* client_; |
MDnsListener::Delegate* delegate_; |
+ base::Time last_update_; |
+ uint32 ttl_; |
bool started_; |
+ bool active_refresh_; |
+ |
+ base::CancelableCallback<void()> next_refresh_; |
szym
2014/01/23 11:24:03
base::CancelableClosure
Noam Samuel
2014/01/23 17:50:42
Done.
|
DISALLOW_COPY_AND_ASSIGN(MDnsListenerImpl); |
}; |