Index: chrome/browser/local_discovery/privet_notifications.cc |
diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc |
index 99a406ba3ff1b207cacda93bfb6b772f9ec8edc3..3faceaff25b9582c6aa6a29c21a5c17728a59473 100644 |
--- a/chrome/browser/local_discovery/privet_notifications.cc |
+++ b/chrome/browser/local_discovery/privet_notifications.cc |
@@ -125,6 +125,20 @@ void PrivetNotificationsListener::DeviceRemoved(const std::string& name) { |
delegate_->PrivetRemoveNotification(name); |
} |
+void PrivetNotificationsListener::DeviceCacheFlushed() { |
+ for (DeviceContextMap::iterator i = devices_seen_.begin(); |
+ i != devices_seen_.end(); ++i) { |
+ DeviceContext* device = i->second.get(); |
+ |
+ device->info_operation.reset(); |
+ device->privet_http_resolution.reset(); |
+ if (device->notification_may_be_active) { |
+ device->notification_may_be_active = false; |
+ delegate_->PrivetRemoveNotification(i->first); |
+ } |
+ } |
+} |
+ |
PrivetNotificationsListener::DeviceContext::DeviceContext() { |
} |
@@ -156,6 +170,10 @@ void PrivetNotificationService::DeviceRemoved(const std::string& name) { |
privet_notifications_listener_->DeviceRemoved(name); |
} |
+void PrivetNotificationService::DeviceCacheFlushed() { |
+ privet_notifications_listener_->DeviceCacheFlushed(); |
+} |
+ |
void PrivetNotificationService::PrivetNotify( |
const std::string& device_name, |
const std::string& human_readable_name, |