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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc

Issue 2395123002: Connecting UserClassifier to NtpSnippetsFetcher (Closed)
Patch Set: A small fix Created 4 years, 2 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: components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc
diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc b/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc
index b5934c737c3d681af283c271baeb5093f0603bce..ccf41a660924236978270e96872ae23b4cffe6d5 100644
--- a/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc
+++ b/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc
@@ -156,6 +156,7 @@ class NTPSnippetsFetcherTest : public testing::Test {
account_tracker_.get())),
fake_token_service_(new FakeProfileOAuth2TokenService()),
pref_service_(new TestingPrefServiceSimple()),
+ user_classifier_(pref_service_.get()),
test_lang_("en-US"),
test_url_(gurl) {
RequestThrottler::RegisterProfilePrefs(pref_service_->registry());
@@ -165,7 +166,7 @@ class NTPSnippetsFetcherTest : public testing::Test {
scoped_refptr<net::TestURLRequestContextGetter>(
new net::TestURLRequestContextGetter(mock_task_runner_.get())),
pref_service_.get(), &category_factory_, base::Bind(&ParseJsonDelayed),
- kAPIKey);
+ kAPIKey, &user_classifier_);
snippets_fetcher_->SetCallback(
base::Bind(&MockSnippetsAvailableCallback::WrappedRun,
@@ -219,6 +220,7 @@ class NTPSnippetsFetcherTest : public testing::Test {
std::unique_ptr<OAuth2TokenService> fake_token_service_;
std::unique_ptr<NTPSnippetsFetcher> snippets_fetcher_;
std::unique_ptr<TestingPrefServiceSimple> pref_service_;
+ UserClassifier user_classifier_;
CategoryFactory category_factory_;
MockSnippetsAvailableCallback mock_callback_;
const std::string test_lang_;

Powered by Google App Engine
This is Rietveld 408576698