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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 1849743002: [NTP Snippets] Add a flag to not restrict snippets by ML suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 9 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 | components/ntp_snippets/switches.h » ('j') | 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 c22b563dee7cc1091ed21cff1b90558e5738d360..b03d0488a29a2bf0a8e1aa985bea6066d9d68813 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -254,6 +254,11 @@ void NTPSnippetsService::OnJsonError(const std::string& snippets_json,
void NTPSnippetsService::FetchSnippetsImpl(
const std::vector<std::string>& hosts) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDontRestrict)) {
+ snippets_fetcher_->FetchSnippets(std::vector<std::string>());
+ return;
+ }
if (!hosts.empty())
snippets_fetcher_->FetchSnippets(hosts);
}
« no previous file with comments | « no previous file | components/ntp_snippets/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698