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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_manager.cc

Issue 2806453002: Don't set a default value for the NTPContentSuggestionsEnabled policy if ChromeHome is enabled (Closed)
Patch Set: argh Created 3 years, 8 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 | « components/policy/core/common/cloud/user_cloud_policy_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/cloud/user_cloud_policy_manager.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_manager.cc b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
index cf68675075eda63817281a0532829bafc39765b3..2114ddee9d894300dcd2d934a1c12e66c0acf63a 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
@@ -38,7 +38,8 @@ UserCloudPolicyManager::UserCloudPolicyManager(
io_task_runner),
store_(std::move(store)),
component_policy_cache_path_(component_policy_cache_path),
- external_data_manager_(std::move(external_data_manager)) {}
+ external_data_manager_(std::move(external_data_manager)),
+ chrome_home_enabled_(false) {}
UserCloudPolicyManager::~UserCloudPolicyManager() {}
@@ -106,8 +107,13 @@ void UserCloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) {
// given that this is an enterprise user.
// TODO(treib,atwilson): We should just call SetEnterpriseUsersDefaults here,
// see crbug.com/640950.
+ // Temporary hack: If Chrome Home is enabled, then do not set the default
+ // value for the NTPContentSuggestionsEnabled policy, so that dogfooders
+ // won't see an almost-empty Chrome Home.
+ // TODO(treib): Remove this before M59 branch point. crbug.com/708191
if (store()->has_policy() &&
- !policy_map->Get(key::kNTPContentSuggestionsEnabled)) {
+ !policy_map->Get(key::kNTPContentSuggestionsEnabled) &&
+ !chrome_home_enabled_) {
policy_map->Set(key::kNTPContentSuggestionsEnabled, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
base::MakeUnique<base::Value>(false),
« no previous file with comments | « components/policy/core/common/cloud/user_cloud_policy_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698