Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1490)

Unified Diff: chrome/browser/ntp_snippets/download_suggestions_provider.cc

Issue 2513393002: [NTP] Cleanup: offline pages related tests. (Closed)
Patch Set: rebase + treib@ comment. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ntp_snippets/download_suggestions_provider.cc
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider.cc b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
index fbcd24e41a30e2cbf2f7750bd3f99d44d03d295e..e91273fe60bee26d12b5dda153e112c494df4844 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -238,10 +238,13 @@ void DownloadSuggestionsProvider::GetDismissedSuggestionsForDebugging(
const ntp_snippets::DismissedSuggestionsCallback& callback) {
DCHECK_EQ(provided_category_, category);
- // TODO(vitaliii): Query all pages instead by using an empty query.
if (offline_page_model_) {
+ // Offline pages which are not related to downloads are also queried here,
+ // so that they can be returned if they happen to be dismissed (e.g. due to
+ // a bug).
+ OfflinePageModelQueryBuilder query_builder;
offline_page_model_->GetPagesMatchingQuery(
- BuildOfflinePageDownloadsQuery(offline_page_model_),
+ query_builder.Build(offline_page_model_->GetPolicyController()),
base::Bind(&DownloadSuggestionsProvider::
GetPagesMatchingQueryCallbackForGetDismissedSuggestions,
weak_ptr_factory_.GetWeakPtr(), callback));
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698