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

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

Issue 2513393002: [NTP] Cleanup: offline pages related tests. (Closed)
Patch Set: 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
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 2c1393158dd627bd903dda2eaa4afd0a8180b4ca..2b9a92eac885c43b728641be4de5f4b194c5db2c 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -233,10 +233,12 @@ 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_) {
+ // Even not related to downloads offline pages are queried here, so that
Marc Treib 2016/11/21 12:27:53 Offline pages which are not related to downloads a
vitaliii 2016/11/21 14:56:46 Done.
+ // they can be returned in case there are problems with dismissing.
Marc Treib 2016/11/21 12:27:53 I don't quite understand this. You're saying, this
vitaliii 2016/11/21 14:56:46 Yes, while testing, I would say. My arguments: 1)
Marc Treib 2016/11/21 15:38:10 Well, it's a method on the Provider, so I'd say it
vitaliii 2016/11/21 15:49:55 Hm, it seems like we misunderstood each other. I
Marc Treib 2016/11/21 15:56:57 Ah, I think I see your point now. No objections th
vitaliii 2016/11/22 06:32:46 Done.
+ 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));

Powered by Google App Engine
This is Rietveld 408576698