| 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/offline_pages/recent_tab_suggestions_provider.
h" | 5 #include "components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.
h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 void RecentTabSuggestionsProvider::FetchSuggestionImage( | 95 void RecentTabSuggestionsProvider::FetchSuggestionImage( |
| 96 const ContentSuggestion::ID& suggestion_id, | 96 const ContentSuggestion::ID& suggestion_id, |
| 97 const ImageFetchedCallback& callback) { | 97 const ImageFetchedCallback& callback) { |
| 98 // TODO(vitaliii): Fetch proper thumbnail from OfflinePageModel once it's | 98 // TODO(vitaliii): Fetch proper thumbnail from OfflinePageModel once it's |
| 99 // available there. | 99 // available there. |
| 100 base::ThreadTaskRunnerHandle::Get()->PostTask( | 100 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 101 FROM_HERE, base::Bind(callback, gfx::Image())); | 101 FROM_HERE, base::Bind(callback, gfx::Image())); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void RecentTabSuggestionsProvider::FetchMore(const Category& category, | 104 void RecentTabSuggestionsProvider::Fetch( |
| 105 FetchedMoreCallback callback) { | 105 const Category& category, |
| 106 // Ignored. | 106 std::set<std::string> known_suggestion_ids, |
| 107 FetchingCallback callback) { |
| 108 NOTREACHED(); |
| 107 } | 109 } |
| 108 | 110 |
| 109 void RecentTabSuggestionsProvider::ClearHistory( | 111 void RecentTabSuggestionsProvider::ClearHistory( |
| 110 base::Time begin, | 112 base::Time begin, |
| 111 base::Time end, | 113 base::Time end, |
| 112 const base::Callback<bool(const GURL& url)>& filter) { | 114 const base::Callback<bool(const GURL& url)>& filter) { |
| 113 ClearDismissedSuggestionsForDebugging(provided_category_); | 115 ClearDismissedSuggestionsForDebugging(provided_category_); |
| 114 FetchRecentTabs(); | 116 FetchRecentTabs(); |
| 115 } | 117 } |
| 116 | 118 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 269 } |
| 268 | 270 |
| 269 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( | 271 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( |
| 270 const std::set<std::string>& dismissed_ids) { | 272 const std::set<std::string>& dismissed_ids) { |
| 271 prefs::StoreDismissedIDsToPrefs(pref_service_, | 273 prefs::StoreDismissedIDsToPrefs(pref_service_, |
| 272 prefs::kDismissedRecentOfflineTabSuggestions, | 274 prefs::kDismissedRecentOfflineTabSuggestions, |
| 273 dismissed_ids); | 275 dismissed_ids); |
| 274 } | 276 } |
| 275 | 277 |
| 276 } // namespace ntp_snippets | 278 } // namespace ntp_snippets |
| OLD | NEW |