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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 1986173003: Fixes that host restriction was sometimes applied even when switched off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index 555e101213efd53b78add33ac071a137b1e92755..9aa87bc4a50d295f364a289e8819b7edc3f1a110 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -186,7 +186,7 @@ void NTPSnippetsService::Init(bool enabled) {
enabled_ = enabled;
if (enabled_) {
// |suggestions_service_| can be null in tests.
- if (suggestions_service_) {
+ if (snippets_fetcher_->UseHostRestriction() && suggestions_service_) {
Marc Treib 2016/05/17 15:23:58 Should we (in another CL) make UseHostRestriction
jkrcal 2016/05/18 08:30:39 I agree, in a separate CL. Heh, I've forgotten to
suggestions_service_subscription_ = suggestions_service_->AddCallback(
base::Bind(&NTPSnippetsService::OnSuggestionsChanged,
base::Unretained(this)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698