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

Unified Diff: components/ntp_snippets/ntp_snippets_status_service.cc

Issue 2165983002: [NTP Snippets] Replace the "DisableSnippets" pref by an "Enable" one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/ntp_snippets_status_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_status_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_status_service.cc b/components/ntp_snippets/ntp_snippets_status_service.cc
index 6adcd350e42a7999e8e1dc1f2c4a390f1b0ce1c0..2aedae2d86abe755fdda5c6f0b47f711464ed71f 100644
--- a/components/ntp_snippets/ntp_snippets_status_service.cc
+++ b/components/ntp_snippets/ntp_snippets_status_service.cc
@@ -27,7 +27,7 @@ NTPSnippetsStatusService::~NTPSnippetsStatusService() {}
// static
void NTPSnippetsStatusService::RegisterProfilePrefs(
PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kDisableSnippets, false);
+ registry->RegisterBooleanPref(prefs::kEnableSnippets, true);
}
void NTPSnippetsStatusService::Init(
@@ -45,7 +45,7 @@ void NTPSnippetsStatusService::Init(
pref_change_registrar_.Init(pref_service_);
pref_change_registrar_.Add(
- prefs::kDisableSnippets,
+ prefs::kEnableSnippets,
base::Bind(&NTPSnippetsStatusService::OnStateChanged,
base::Unretained(this)));
}
@@ -61,7 +61,7 @@ void NTPSnippetsStatusService::OnStateChanged() {
}
DisabledReason NTPSnippetsStatusService::GetDisabledReasonFromDeps() const {
- if (pref_service_->GetBoolean(prefs::kDisableSnippets)) {
+ if (!pref_service_->GetBoolean(prefs::kEnableSnippets)) {
DVLOG(1) << "[GetNewDisabledReason] Disabled via pref";
return DisabledReason::EXPLICITLY_DISABLED;
}
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_status_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698