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

Unified Diff: components/physical_web/data_source/fake_physical_web_data_source.cc

Issue 2561493002: Pass Physical Web metadata through a struct (Closed)
Patch Set: Forward declare MetadataList Created 3 years, 11 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/fake_physical_web_data_source.cc
diff --git a/components/physical_web/data_source/fake_physical_web_data_source.cc b/components/physical_web/data_source/fake_physical_web_data_source.cc
index 2419a6d02058eb527661372877b4c83c96ac565d..d5ebbb11f662b6ad694435ad2fcf60d1eef1afbc 100644
--- a/components/physical_web/data_source/fake_physical_web_data_source.cc
+++ b/components/physical_web/data_source/fake_physical_web_data_source.cc
@@ -73,6 +73,10 @@ std::unique_ptr<base::ListValue> FakePhysicalWebDataSource::GetMetadata() {
return metadata_->CreateDeepCopy();
}
+std::unique_ptr<MetadataList> FakePhysicalWebDataSource::GetMetadataList() {
+ return base::MakeUnique<MetadataList>(*metadata_list_.get());
+}
+
bool FakePhysicalWebDataSource::HasUnresolvedDiscoveries() {
return false;
}
@@ -92,6 +96,11 @@ void FakePhysicalWebDataSource::SetMetadata(
metadata_ = std::move(metadata);
}
+void FakePhysicalWebDataSource::SetMetadataList(
+ std::unique_ptr<MetadataList> metadata_list) {
+ metadata_list_ = std::move(metadata_list);
+}
+
void FakePhysicalWebDataSource::NotifyOnFound(const GURL& url) {
for (PhysicalWebListener& observer : observer_list_)
observer.OnFound(url);

Powered by Google App Engine
This is Rietveld 408576698