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

Unified Diff: components/ntp_snippets/offline_pages/recent_tab_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: components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
index eea6875456b3364b5d4462a760b5f113fccb0d08..f24cef7f1bdd270d395c1a8bbeb22a89c3358987 100644
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
@@ -142,9 +142,11 @@ void RecentTabSuggestionsProvider::GetDismissedSuggestionsForDebugging(
const DismissedSuggestionsCallback& callback) {
DCHECK_EQ(provided_category_, category);
- // TODO(vitaliii): Query all pages instead by using an empty query.
+ // Even not related to recent tab offline pages are queried here, so that
Marc Treib 2016/11/21 12:27:53 Also here: IMO this is hard to parse, maybe "Offli
vitaliii 2016/11/21 14:56:46 Done. I did it similarly to your comment in Downlo
+ // they can be returned in case there are problems with dismissing.
+ OfflinePageModelQueryBuilder query_builder;
offline_page_model_->GetPagesMatchingQuery(
- BuildRecentTabsQuery(offline_page_model_),
+ query_builder.Build(offline_page_model_->GetPolicyController()),
base::Bind(&RecentTabSuggestionsProvider::
GetPagesMatchingQueryCallbackForGetDismissedSuggestions,
weak_ptr_factory_.GetWeakPtr(), callback));

Powered by Google App Engine
This is Rietveld 408576698