Chromium Code Reviews| 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..2df825464c38a653a625c670817f52f54e7eefc8 |
| --- /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 (auto& suggestion : suggestions) { |
|
Bernhard Bauer
2016/08/12 13:49:06
Can you use the actual type here? It's not that mu
vitaliii
2016/08/16 07:31:21
Done.
|
| + suggestions_list.emplace_back(std::move(suggestion)); |
|
Bernhard Bauer
2016/08/12 13:49:06
Same comment about push_back() applies here.
vitaliii
2016/08/16 07:31:21
Done.
|
| + } |
| + OnNewSuggestions(provider, category, suggestions_list); |
| +} |
| + |
| +} // namespace ntp_snippets |