Chromium Code Reviews| 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()); |
|
nyquist
2017/01/05 07:42:28
Does this copy all the underlying elements? Should
cco3
2017/01/05 23:52:56
This test datasource gets reused, so we do want to
|
| +} |
| + |
| 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); |