| Index: chrome/browser/supervised_user/supervised_user_service.cc
|
| diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc
|
| index 6931aa07dbfdc5c78b8426f62e57f583b711ab1c..76c4288a97c1b46f832eaf287e15b51873a69699 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_service.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_service.cc
|
| @@ -56,7 +56,7 @@
|
| #endif
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
| -#include "extensions/browser/extension_registry.h"
|
| +#include "chrome/browser/extensions/extension_service.h"
|
| #include "extensions/browser/extension_system.h"
|
| #endif
|
|
|
| @@ -540,6 +540,9 @@ void SupervisedUserService::SetExtensionsActive() {
|
| management_policy->RegisterProvider(this);
|
| else
|
| management_policy->UnregisterProvider(this);
|
| +
|
| + // Re-check the policy to make sure any new settings get applied.
|
| + extension_system->extension_service()->CheckManagementPolicy();
|
| }
|
| }
|
| #endif // defined(ENABLE_EXTENSIONS)
|
| @@ -761,9 +764,8 @@ void SupervisedUserService::SetActive(bool active) {
|
| #if defined(ENABLE_THEMES)
|
| // Re-set the default theme to turn the SU theme on/off.
|
| ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile_);
|
| - if (theme_service->UsingDefaultTheme() || theme_service->UsingSystemTheme()) {
|
| - ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme();
|
| - }
|
| + if (theme_service->UsingDefaultTheme() || theme_service->UsingSystemTheme())
|
| + theme_service->UseDefaultTheme();
|
| #endif
|
|
|
| ProfileSyncService* sync_service =
|
| @@ -798,11 +800,11 @@ void SupervisedUserService::SetActive(bool active) {
|
| whitelist_service_->Init();
|
| UpdateManualHosts();
|
| UpdateManualURLs();
|
| - if (profile_->IsChild() &&
|
| + if (profile_->IsChild() && delegate_ &&
|
| supervised_users::IsSafeSitesBlacklistEnabled()) {
|
| LoadBlacklist(GetBlacklistPath(), GURL(kBlacklistURL));
|
| }
|
| - if (profile_->IsChild() &&
|
| + if (profile_->IsChild() && delegate_ &&
|
| supervised_users::IsSafeSitesOnlineCheckEnabled()) {
|
| url_filter_context_.InitAsyncURLChecker(profile_->GetRequestContext());
|
| }
|
|
|