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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Comments Created 5 years, 10 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 20957bd50d2c3ede449e0c361b748b254f190304..08eef4526dbd68029a822006566ddc466b7e8696 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,12 @@ 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));
+ profile->GetHostContentSettingsMap()->RegisterProvider(
+ HostContentSettingsMap::SUPERVISED_PROVIDER, supervised_provider.Pass());
#endif
// Start the deferred task runners once the profile is loaded.
StartupTaskRunnerServiceFactory::GetForProfile(profile)->

Powered by Google App Engine
This is Rietveld 408576698