Chromium Code Reviews| Index: components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.cc |
| diff --git a/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.cc b/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0864cf81382465a297f42ec0de1282d5bc486a0d |
| --- /dev/null |
| +++ b/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.cc |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h" |
| + |
| +using base::Value; |
| + |
| +namespace ntp_snippets { |
| + |
| +namespace {} // namespace |
|
Marc Treib
2016/11/23 09:47:52
?
vitaliii
2016/11/23 14:16:52
Done.
|
| + |
| +FakePhysicalWebDataSource::FakePhysicalWebDataSource() = default; |
| + |
| +FakePhysicalWebDataSource::~FakePhysicalWebDataSource() = default; |
| + |
| +void FakePhysicalWebDataSource::StartDiscovery(bool network_request_enabled) { |
| + NOTREACHED(); |
| +} |
| + |
| +void FakePhysicalWebDataSource::StopDiscovery() { |
| + NOTREACHED(); |
| +} |
| + |
| +std::unique_ptr<base::ListValue> FakePhysicalWebDataSource::GetMetadata() { |
| + return metadata_->CreateDeepCopy(); |
| +} |
| + |
| +bool FakePhysicalWebDataSource::HasUnresolvedDiscoveries() { |
| + NOTREACHED(); |
| + return false; |
| +} |
| + |
| +void FakePhysicalWebDataSource::RegisterListener( |
| + PhysicalWebListener* physical_web_listener) { |
| + // Ignored. Instead notify the provider directly. |
| +} |
| + |
| +void FakePhysicalWebDataSource::UnregisterListener( |
| + PhysicalWebListener* physical_web_listener) { |
| + // Ignored. |
| +} |
| + |
| +void FakePhysicalWebDataSource::SetMetadata( |
| + std::unique_ptr<base::ListValue> metadata) { |
| + metadata_ = std::move(metadata); |
| +} |
| + |
| +} // namespace ntp_snippets |