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

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

Issue 2578173002: NTP: Extract JSON requests from Fetcher. (Closed)
Patch Set: No outside accesses to ntp_snippets::internal::* 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 1c39bb8b8c8972a48d2b82db23751c7c0c9a92bc..a914feddfd13cdeca8873531dcb37d72167470fc 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider.h
+++ b/components/ntp_snippets/remote/remote_suggestions_provider.h
@@ -27,6 +27,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