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

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

Issue 2683383002: [NTP:Downloads] Request offline pages even if model is not loaded. (Closed)
Patch Set: Created 3 years, 10 months 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 08cb77b9280cdb09af2b4aed10a0f31690e43ee9..f9e430a028d49184f0646a7635ae0fa027d269a0 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -492,15 +492,8 @@ void DownloadSuggestionsProvider::AsynchronouslyFetchOfflinePagesDownloads(
return;
}
- if (!offline_page_model_->is_loaded()) {
- // Offline pages model is not ready yet and may return no offline pages.
- if (notify) {
- SubmitContentSuggestions();
Marc Treib 2017/02/10 09:08:11 So the change is essentially to *not* notify here?
vitaliii 2017/02/10 09:39:56 The change is to query even if the model has not b
Marc Treib 2017/02/10 10:05:02 Ah, I thought we'd query as soon as the model has
vitaliii 2017/02/10 12:54:11 But previously we would show incomplete list (with
- }
-
- return;
- }
-
+ // If Offline Page model is not loaded yet, it will process our query once it
+ // has finished loading.
offline_page_model_->GetPagesMatchingQuery(
BuildOfflinePageDownloadsQuery(offline_page_model_),
base::Bind(&DownloadSuggestionsProvider::UpdateOfflinePagesCache,

Powered by Google App Engine
This is Rietveld 408576698