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

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: Add required/optional comments Created 4 years 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 adc64566cf97f142e07b420a7c28d97a6883472c..1ebec3aec32d38607151b664e0dce25ce4285720 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
@@ -72,6 +72,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;
}
@@ -91,6 +95,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 std::string& url) {
for (PhysicalWebListener& observer : observer_list_)
observer.OnFound(url);

Powered by Google App Engine
This is Rietveld 408576698