Chromium Code Reviews| Index: chrome/browser/profiles/profile_manager.cc |
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
| index 20957bd50d2c3ede449e0c361b748b254f190304..35cd1bbe2373dbf1c64a0a09b4905d4551e47ad8 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -75,10 +75,13 @@ |
| #endif |
| #if defined(ENABLE_SUPERVISED_USERS) |
| +#include "chrome/browser/content_settings/content_settings_supervised_provider.h" |
| #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| #include "chrome/browser/supervised_user/child_accounts/child_account_service_factory.h" |
| #include "chrome/browser/supervised_user/supervised_user_service.h" |
| #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| +#include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| +#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" |
| #endif |
| #if !defined(OS_IOS) |
| @@ -1037,6 +1040,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, |
| // initializing the supervised flag if necessary). |
| ChildAccountServiceFactory::GetForProfile(profile)->Init(); |
| SupervisedUserServiceFactory::GetForProfile(profile)->Init(); |
| + SupervisedUserSettingsService* supervised_service = |
| + SupervisedUserSettingsServiceFactory::GetForProfile(profile); |
| + scoped_ptr<content_settings::SupervisedProvider> supervised_provider( |
| + new content_settings::SupervisedProvider()); |
| + supervised_service->Subscribe(base::Bind( |
| + &content_settings::SupervisedProvider::OnSupervisedSettingsAvailable, |
| + base::Unretained(supervised_provider.get()))); |
| + profile->GetHostContentSettingsMap()->RegisterProvider( |
|
Bernhard Bauer
2015/02/26 18:03:54
Can we do this when the HCSM is created instead?
knn
2015/02/27 10:43:53
This is called when the profile is created. Isn't
Bernhard Bauer
2015/02/27 11:20:25
It is, but the right place for it is in the Profil
knn
2015/02/27 12:05:15
Acknowledged.
|
| + HostContentSettingsMap::SUPERVISED_PROVIDER, supervised_provider.Pass()); |
| #endif |
| // Start the deferred task runners once the profile is loaded. |
| StartupTaskRunnerServiceFactory::GetForProfile(profile)-> |