| 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, |
| 105 FetchedMoreCallback callback) { |
| 106 // Ignored. |
| 107 } |
| 108 |
| 104 void RecentTabSuggestionsProvider::ClearHistory( | 109 void RecentTabSuggestionsProvider::ClearHistory( |
| 105 base::Time begin, | 110 base::Time begin, |
| 106 base::Time end, | 111 base::Time end, |
| 107 const base::Callback<bool(const GURL& url)>& filter) { | 112 const base::Callback<bool(const GURL& url)>& filter) { |
| 108 ClearDismissedSuggestionsForDebugging(provided_category_); | 113 ClearDismissedSuggestionsForDebugging(provided_category_); |
| 109 FetchRecentTabs(); | 114 FetchRecentTabs(); |
| 110 } | 115 } |
| 111 | 116 |
| 112 void RecentTabSuggestionsProvider::ClearCachedSuggestions(Category category) { | 117 void RecentTabSuggestionsProvider::ClearCachedSuggestions(Category category) { |
| 113 // Ignored. | 118 // Ignored. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 267 } |
| 263 | 268 |
| 264 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( | 269 void RecentTabSuggestionsProvider::StoreDismissedIDsToPrefs( |
| 265 const std::set<std::string>& dismissed_ids) { | 270 const std::set<std::string>& dismissed_ids) { |
| 266 prefs::StoreDismissedIDsToPrefs(pref_service_, | 271 prefs::StoreDismissedIDsToPrefs(pref_service_, |
| 267 prefs::kDismissedRecentOfflineTabSuggestions, | 272 prefs::kDismissedRecentOfflineTabSuggestions, |
| 268 dismissed_ids); | 273 dismissed_ids); |
| 269 } | 274 } |
| 270 | 275 |
| 271 } // namespace ntp_snippets | 276 } // namespace ntp_snippets |
| OLD | NEW |