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

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

Issue 2704203002: Merge "[NTP:Downloads] Request offline pages even if model is not ..." (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
« 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 68e096e99727fe07f72b6618ea14d7d3021caa22..2949fee7cd98add298ca1e79984a2249b9462b43 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -464,15 +464,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();
- }
-
- 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,
« 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