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

Unified Diff: components/ntp_snippets/mock_content_suggestions_provider_observer.cc

Issue 2228553003: a provider of Physical Web pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolved compile error. Created 4 years, 4 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/ntp_snippets/mock_content_suggestions_provider_observer.cc
diff --git a/components/ntp_snippets/mock_content_suggestions_provider_observer.cc b/components/ntp_snippets/mock_content_suggestions_provider_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b9afca3a1b2c1ad80567fa2d7acaaddbe771dee3
--- /dev/null
+++ b/components/ntp_snippets/mock_content_suggestions_provider_observer.cc
@@ -0,0 +1,26 @@
+// 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/mock_content_suggestions_provider_observer.h"
+
+namespace ntp_snippets {
+
+MockContentSuggestionsProviderObserver::
+ MockContentSuggestionsProviderObserver() {}
+
+MockContentSuggestionsProviderObserver::
+ ~MockContentSuggestionsProviderObserver() {}
+
+void MockContentSuggestionsProviderObserver::OnNewSuggestions(
+ ContentSuggestionsProvider* provider,
+ Category category,
+ std::vector<ContentSuggestion> suggestions) {
+ std::list<ContentSuggestion> suggestions_list;
+ for (ContentSuggestion& suggestion : suggestions) {
+ suggestions_list.push_back(std::move(suggestion));
+ }
+ OnNewSuggestions(provider, category, suggestions_list);
+}
+
+} // namespace ntp_snippets

Powered by Google App Engine
This is Rietveld 408576698