| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/ntp_snippets/ntp_snippets_service.h" | 5 #include "components/ntp_snippets/ntp_snippets_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 MakeUniqueID(provided_category_, snippet->id()), | 788 MakeUniqueID(provided_category_, snippet->id()), |
| 789 snippet->best_source().url); | 789 snippet->best_source().url); |
| 790 suggestion.set_amp_url(snippet->best_source().amp_url); | 790 suggestion.set_amp_url(snippet->best_source().amp_url); |
| 791 suggestion.set_title(snippet->title()); | 791 suggestion.set_title(snippet->title()); |
| 792 suggestion.set_snippet_text(snippet->snippet()); | 792 suggestion.set_snippet_text(snippet->snippet()); |
| 793 suggestion.set_publish_date(snippet->publish_date()); | 793 suggestion.set_publish_date(snippet->publish_date()); |
| 794 suggestion.set_publisher_name(snippet->best_source().publisher_name); | 794 suggestion.set_publisher_name(snippet->best_source().publisher_name); |
| 795 suggestion.set_score(snippet->score()); | 795 suggestion.set_score(snippet->score()); |
| 796 result.emplace_back(std::move(suggestion)); | 796 result.emplace_back(std::move(suggestion)); |
| 797 } | 797 } |
| 798 observer_->OnNewSuggestions(provided_category_, std::move(result)); | 798 observer_->OnNewSuggestions(this, provided_category_, std::move(result)); |
| 799 } | 799 } |
| 800 | 800 |
| 801 void NTPSnippetsService::NotifyCategoryStatusChanged() { | 801 void NTPSnippetsService::NotifyCategoryStatusChanged() { |
| 802 if (observer_) { | 802 if (observer_) { |
| 803 observer_->OnCategoryStatusChanged(provided_category_, category_status_); | 803 observer_->OnCategoryStatusChanged(this, provided_category_, |
| 804 category_status_); |
| 804 } | 805 } |
| 805 } | 806 } |
| 806 | 807 |
| 807 } // namespace ntp_snippets | 808 } // namespace ntp_snippets |
| OLD | NEW |