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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider.h

Issue 2578173002: NTP: Extract JSON requests from Fetcher. (Closed)
Patch Set: Use |GetVariationParamByFeatureAsBool|. Created 4 years 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/remote/remote_suggestions_provider.h
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider.h b/components/ntp_snippets/remote/remote_suggestions_provider.h
index 6f7c4fbfbc56f6c6b8c072ecb581aeab2d29023f..e743b42951a75c8322bf0bcf98ac7a4fd16d3fbb 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider.h
+++ b/components/ntp_snippets/remote/remote_suggestions_provider.h
@@ -26,6 +26,7 @@
#include "components/ntp_snippets/content_suggestions_provider.h"
#include "components/ntp_snippets/remote/ntp_snippet.h"
#include "components/ntp_snippets/remote/ntp_snippets_fetcher.h"
+#include "components/ntp_snippets/remote/ntp_snippets_request_params.h"
#include "components/ntp_snippets/remote/ntp_snippets_scheduler.h"
#include "components/ntp_snippets/remote/remote_suggestions_status_service.h"
#include "components/ntp_snippets/remote/request_throttler.h"
@@ -148,6 +149,9 @@ class RemoteSuggestionsProvider final : public ContentSuggestionsProvider {
// and request lower latency processing.
void FetchSnippetsForAllCategories();
+ // Only used in tests and for debugging in snippets-internal/.
+ // TODO(fhorschig): Remove this getter when there is an interface for the
+ // fetcher that allows better mocks.
const NTPSnippetsFetcher* snippets_fetcher() const {
return snippets_fetcher_.get();
}
@@ -393,7 +397,7 @@ class RemoteSuggestionsProvider final : public ContentSuggestionsProvider {
void RestoreCategoriesFromPrefs();
void StoreCategoriesToPrefs();
- NTPSnippetsFetcher::Params BuildFetchParams() const;
+ NTPSnippetsRequestParams BuildFetchParams() const;
void MarkEmptyCategoriesAsLoading();

Powered by Google App Engine
This is Rietveld 408576698