OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/physical_web_pages/physical_web_page_suggestio
ns_provider.h" | 5 #include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestio
ns_provider.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 void PhysicalWebPageSuggestionsProvider::FetchSuggestionImage( | 82 void PhysicalWebPageSuggestionsProvider::FetchSuggestionImage( |
83 const ContentSuggestion::ID& suggestion_id, | 83 const ContentSuggestion::ID& suggestion_id, |
84 const ImageFetchedCallback& callback) { | 84 const ImageFetchedCallback& callback) { |
85 // TODO(vitaliii): Implement. | 85 // TODO(vitaliii): Implement. |
86 base::ThreadTaskRunnerHandle::Get()->PostTask( | 86 base::ThreadTaskRunnerHandle::Get()->PostTask( |
87 FROM_HERE, base::Bind(callback, gfx::Image())); | 87 FROM_HERE, base::Bind(callback, gfx::Image())); |
88 } | 88 } |
89 | 89 |
| 90 void PhysicalWebPageSuggestionsProvider::FetchMore( |
| 91 const Category& category, |
| 92 FetchedMoreCallback callback) { |
| 93 // Ignored. |
| 94 } |
| 95 |
90 void PhysicalWebPageSuggestionsProvider::ClearHistory( | 96 void PhysicalWebPageSuggestionsProvider::ClearHistory( |
91 base::Time begin, | 97 base::Time begin, |
92 base::Time end, | 98 base::Time end, |
93 const base::Callback<bool(const GURL& url)>& filter) { | 99 const base::Callback<bool(const GURL& url)>& filter) { |
94 ClearDismissedSuggestionsForDebugging(provided_category_); | 100 ClearDismissedSuggestionsForDebugging(provided_category_); |
95 } | 101 } |
96 | 102 |
97 void PhysicalWebPageSuggestionsProvider::ClearCachedSuggestions( | 103 void PhysicalWebPageSuggestionsProvider::ClearCachedSuggestions( |
98 Category category) { | 104 Category category) { |
99 // Ignored | 105 // Ignored |
(...skipping 16 matching lines...) Expand all Loading... |
116 | 122 |
117 // Updates the |category_status_| and notifies the |observer_|, if necessary. | 123 // Updates the |category_status_| and notifies the |observer_|, if necessary. |
118 void PhysicalWebPageSuggestionsProvider::NotifyStatusChanged( | 124 void PhysicalWebPageSuggestionsProvider::NotifyStatusChanged( |
119 CategoryStatus new_status) { | 125 CategoryStatus new_status) { |
120 if (category_status_ == new_status) return; | 126 if (category_status_ == new_status) return; |
121 category_status_ = new_status; | 127 category_status_ = new_status; |
122 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 128 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
123 } | 129 } |
124 | 130 |
125 } // namespace ntp_snippets | 131 } // namespace ntp_snippets |
OLD | NEW |