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

Unified Diff: chrome/browser/supervised_user/child_accounts/child_account_service.cc

Issue 2628883008: Add a supervised user setting to allow all cookies. (Closed)
Patch Set: . Created 3 years, 11 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: chrome/browser/supervised_user/child_accounts/child_account_service.cc
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.cc b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
index c6fbe1ef1db3ee0b640d9f898197e8506e9078f0..07dda34ea1457a4852320ed9a853a166e59b3e83 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
@@ -152,6 +152,11 @@ bool ChildAccountService::SetActive(bool active) {
supervised_users::kSigninAllowed,
base::MakeUnique<base::FundamentalValue>(true));
+ // Always allow cookies, to avoid website compatibility issues.
+ settings_service->SetLocalSetting(
+ supervised_users::kCookiesAlwaysAllowed,
+ base::MakeUnique<base::FundamentalValue>(true));
+
// SafeSearch is controlled at the account level, so don't override it
// client-side.
settings_service->SetLocalSetting(
@@ -180,8 +185,15 @@ bool ChildAccountService::SetActive(bool active) {
} else {
SupervisedUserSettingsService* settings_service =
SupervisedUserSettingsServiceFactory::GetForProfile(profile_);
+ settings_service->SetLocalSetting(
+ supervised_users::kRecordHistoryIncludesSessionSync, nullptr);
settings_service->SetLocalSetting(supervised_users::kSigninAllowed,
- std::unique_ptr<base::Value>());
+ nullptr);
+ settings_service->SetLocalSetting(supervised_users::kCookiesAlwaysAllowed,
+ nullptr);
+ settings_service->SetLocalSetting(supervised_users::kForceSafeSearch,
+ nullptr);
Marc Treib 2017/01/16 17:24:40 Are these changes required? Were things broken bef
Bernhard Bauer 2017/01/17 13:54:13 Probably? :) The case where a profile changes from
Marc Treib 2017/01/17 13:57:54 Interesting ;-) It's also possible that SU setting
+
#if !defined(OS_CHROMEOS)
SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(false);
#endif

Powered by Google App Engine
This is Rietveld 408576698