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