| 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 20c3f5a3f9708ff3c6f4840c20008f087fafbfab..b5b30610443008d711fe2a0d74dc0a23d0d6ca80 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_service.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_service.cc
|
| @@ -54,7 +54,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
|
|
|
| @@ -541,6 +541,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,13 +800,13 @@ void SupervisedUserService::SetActive(bool active) {
|
| whitelist_service_->Init();
|
| UpdateManualHosts();
|
| UpdateManualURLs();
|
| - if (profile_->IsChild() &&
|
| + if (profile_->IsChild() && delegate_ &&
|
| supervised_users::IsSafeSitesBlacklistEnabled()) {
|
| base::FilePath blacklist_path = delegate_->GetBlacklistPath();
|
| if (!blacklist_path.empty())
|
| LoadBlacklist(blacklist_path, delegate_->GetBlacklistURL());
|
| }
|
| - if (profile_->IsChild() &&
|
| + if (profile_->IsChild() && delegate_ &&
|
| supervised_users::IsSafeSitesOnlineCheckEnabled()) {
|
| const std::string& cx = delegate_->GetSafeSitesCx();
|
| if (!cx.empty()) {
|
|
|