| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void RecentTabSuggestionsProvider::FetchSuggestionImage( | 98 void RecentTabSuggestionsProvider::FetchSuggestionImage( |
| 99 const ContentSuggestion::ID& suggestion_id, | 99 const ContentSuggestion::ID& suggestion_id, |
| 100 const ImageFetchedCallback& callback) { | 100 const ImageFetchedCallback& callback) { |
| 101 // TODO(vitaliii): Fetch proper thumbnail from OfflinePageModel once it's | 101 // TODO(vitaliii): Fetch proper thumbnail from OfflinePageModel once it's |
| 102 // available there. | 102 // available there. |
| 103 base::ThreadTaskRunnerHandle::Get()->PostTask( | 103 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 104 FROM_HERE, base::Bind(callback, gfx::Image())); | 104 FROM_HERE, base::Bind(callback, gfx::Image())); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void RecentTabSuggestionsProvider::FetchMore(const Category& category, |
| 108 FetchedMoreCallback callback) { |
| 109 // Ignored. |
| 110 } |
| 111 |
| 107 void RecentTabSuggestionsProvider::ClearHistory( | 112 void RecentTabSuggestionsProvider::ClearHistory( |
| 108 base::Time begin, | 113 base::Time begin, |
| 109 base::Time end, | 114 base::Time end, |
| 110 const base::Callback<bool(const GURL& url)>& filter) { | 115 const base::Callback<bool(const GURL& url)>& filter) { |
| 111 ClearDismissedSuggestionsForDebugging(provided_category_); | 116 ClearDismissedSuggestionsForDebugging(provided_category_); |
| 112 FetchRecentTabs(); | 117 FetchRecentTabs(); |
| 113 } | 118 } |
| 114 | 119 |
| 115 void RecentTabSuggestionsProvider::ClearCachedSuggestions(Category category) { | 120 void RecentTabSuggestionsProvider::ClearCachedSuggestions(Category category) { |
| 116 // Ignored. | 121 // Ignored. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 270 } |
| 266 | 271 |
| 267 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( | 272 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( |
| 268 const std::set<std::string>& dismissed_ids) { | 273 const std::set<std::string>& dismissed_ids) { |
| 269 prefs::StoreDismissedIDsToPrefs(pref_service_, | 274 prefs::StoreDismissedIDsToPrefs(pref_service_, |
| 270 prefs::kDismissedRecentOfflineTabSuggestions, | 275 prefs::kDismissedRecentOfflineTabSuggestions, |
| 271 dismissed_ids); | 276 dismissed_ids); |
| 272 } | 277 } |
| 273 | 278 |
| 274 } // namespace ntp_snippets | 279 } // namespace ntp_snippets |
| OLD | NEW |