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

Unified Diff: chrome/browser/local_discovery/privet_notifications.cc

Issue 23851008: Added cache flush on network change to ServiceDiscoveryHostClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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,
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications.h ('k') | chrome/browser/local_discovery/service_discovery_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698