mock_content_suggestions_provider_observer.cc 900 B

1234567891011121314151617181920212223242526
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/ntp_snippets/mock_content_suggestions_provider_observer.h"
  5. namespace ntp_snippets {
  6. MockContentSuggestionsProviderObserver::
  7. MockContentSuggestionsProviderObserver() = default;
  8. MockContentSuggestionsProviderObserver::
  9. ~MockContentSuggestionsProviderObserver() = default;
  10. void MockContentSuggestionsProviderObserver::OnNewSuggestions(
  11. ContentSuggestionsProvider* provider,
  12. Category category,
  13. std::vector<ContentSuggestion> suggestions) {
  14. std::list<ContentSuggestion> suggestions_list;
  15. for (ContentSuggestion& suggestion : suggestions) {
  16. suggestions_list.push_back(std::move(suggestion));
  17. }
  18. OnNewSuggestions(provider, category, suggestions_list);
  19. }
  20. } // namespace ntp_snippets