| 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 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 bool initialized() const { return ready() || state_ == State::DISABLED; } | 137 bool initialized() const { return ready() || state_ == State::DISABLED; } |
| 138 | 138 |
| 139 // RemoteSuggestionsProvider implementation. | 139 // RemoteSuggestionsProvider implementation. |
| 140 void RefetchInTheBackground(const FetchStatusCallback& callback) override; | 140 void RefetchInTheBackground(const FetchStatusCallback& callback) override; |
| 141 | 141 |
| 142 // TODO(fhorschig): Remove this getter when there is an interface for the | 142 // TODO(fhorschig): Remove this getter when there is an interface for the |
| 143 // fetcher that allows better mocks. | 143 // fetcher that allows better mocks. |
| 144 const RemoteSuggestionsFetcher* suggestions_fetcher_for_debugging() | 144 const RemoteSuggestionsFetcher* suggestions_fetcher_for_debugging() |
| 145 const override; | 145 const override; |
| 146 | 146 |
| 147 GURL GetUrlWithFavicon( |
| 148 const ContentSuggestion::ID& suggestion_id) const override; |
| 149 |
| 147 // ContentSuggestionsProvider implementation. | 150 // ContentSuggestionsProvider implementation. |
| 148 CategoryStatus GetCategoryStatus(Category category) override; | 151 CategoryStatus GetCategoryStatus(Category category) override; |
| 149 CategoryInfo GetCategoryInfo(Category category) override; | 152 CategoryInfo GetCategoryInfo(Category category) override; |
| 150 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; | 153 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; |
| 151 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, | 154 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, |
| 152 const ImageFetchedCallback& callback) override; | 155 const ImageFetchedCallback& callback) override; |
| 153 void Fetch(const Category& category, | 156 void Fetch(const Category& category, |
| 154 const std::set<std::string>& known_suggestion_ids, | 157 const std::set<std::string>& known_suggestion_ids, |
| 155 const FetchDoneCallback& callback) override; | 158 const FetchDoneCallback& callback) override; |
| 156 void ReloadSuggestions() override; | 159 void ReloadSuggestions() override; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 459 |
| 457 // A clock for getting the time. This allows to inject a clock in tests. | 460 // A clock for getting the time. This allows to inject a clock in tests. |
| 458 std::unique_ptr<base::Clock> clock_; | 461 std::unique_ptr<base::Clock> clock_; |
| 459 | 462 |
| 460 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProviderImpl); | 463 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProviderImpl); |
| 461 }; | 464 }; |
| 462 | 465 |
| 463 } // namespace ntp_snippets | 466 } // namespace ntp_snippets |
| 464 | 467 |
| 465 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ | 468 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_IMPL_H_ |
| OLD | NEW |