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

Unified Diff: components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.cc

Issue 2517113005: [NTP::PhysicalWeb] Wire Physical Web provider to the data source. (Closed)
Patch Set: proper deps. Created 4 years, 1 month 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/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

Powered by Google App Engine
This is Rietveld 408576698