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

Unified Diff: chrome/browser/extensions/api/dial/dial_registry.cc

Issue 1810433002: [DIAL API] Force increment registry generation on discoverNow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/dial/dial_registry.cc
diff --git a/chrome/browser/extensions/api/dial/dial_registry.cc b/chrome/browser/extensions/api/dial/dial_registry.cc
index 45a7400b1122a1c87a91169e662d09ed3be7ac8d..ab0b2a1fe6d2b53090a76c23dcebd1bb27d2fe52 100644
--- a/chrome/browser/extensions/api/dial/dial_registry.cc
+++ b/chrome/browser/extensions/api/dial/dial_registry.cc
@@ -106,7 +106,14 @@ bool DialRegistry::DiscoverNow() {
if (!dial_->HasObserver(this))
NOTREACHED() << "DiscoverNow() called without observing dial_";
- return dial_->Discover();
+
+ // Force increment |registry_generation_| to ensure an event is sent even if
+ // the device list did not change.
+ bool started = dial_->Discover();
+ if (started)
+ ++registry_generation_;
+
+ return started;
}
void DialRegistry::StartPeriodicDiscovery() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698