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

Unified Diff: components/physical_web/data_source/physical_web_data_source_impl.h

Issue 2765713002: Associate a scan mode with Physical Web listeners (Closed)
Patch Set: Use key as parame to erase() Created 3 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
Index: components/physical_web/data_source/physical_web_data_source_impl.h
diff --git a/components/physical_web/data_source/physical_web_data_source_impl.h b/components/physical_web/data_source/physical_web_data_source_impl.h
index a9326d2e0972794f2533703315434ba289cddf38..0930d50a5b4cc214bafff22582e8b9427df67940 100644
--- a/components/physical_web/data_source/physical_web_data_source_impl.h
+++ b/components/physical_web/data_source/physical_web_data_source_impl.h
@@ -19,7 +19,8 @@ class PhysicalWebDataSourceImpl : public PhysicalWebDataSource {
~PhysicalWebDataSourceImpl() override;
// Register for changes to Physical Web URLs and associated page metadata.
- void RegisterListener(PhysicalWebListener* physical_web_listener) override;
+ void RegisterListener(PhysicalWebListener* physical_web_listener,
+ ScanMode scan_mode) override;
// Unregister for changes to Physical Web URLs and associated page metadata.
void UnregisterListener(PhysicalWebListener* physical_web_listener) override;
@@ -31,11 +32,11 @@ class PhysicalWebDataSourceImpl : public PhysicalWebDataSource {
void NotifyOnLost(const GURL& url);
// Notify all registered listeners that a distance has changed for a URL.
- void NotifyOnDistanceChanged(const GURL& url,
- double distance_estimate);
+ void NotifyOnDistanceChanged(const GURL& url, double distance_estimate);
private:
base::ObserverList<PhysicalWebListener> observer_list_;
+ std::unordered_map<PhysicalWebListener*, ScanMode> scan_modes_;
};
} // namespace physical_web

Powered by Google App Engine
This is Rietveld 408576698