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

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

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 05bd533d4a6ece678fe3d1b9d5096a95360bb7e8..0930e15184e9a8afe0390e023f42465ec4b033c2 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -143,6 +143,7 @@
#endif
#if defined(ENABLE_SUPERVISED_USERS)
+#include "chrome/browser/content_settings/content_settings_supervised_provider.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
#include "chrome/browser/supervised_user/supervised_user_settings_service.h"
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
@@ -475,7 +476,7 @@ ProfileImpl::ProfileImpl(
BrowserContextDependencyManager::GetInstance()->
RegisterProfilePrefsForServices(this, pref_registry_.get());
- SupervisedUserSettingsService* supervised_user_settings = NULL;
+ SupervisedUserSettingsService* supervised_user_settings = nullptr;
#if defined(ENABLE_SUPERVISED_USERS)
supervised_user_settings =
SupervisedUserSettingsServiceFactory::GetForProfile(this);
@@ -1040,6 +1041,15 @@ HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!host_content_settings_map_.get()) {
host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
+#if defined(ENABLE_SUPERVISED_USERS)
+ SupervisedUserSettingsService* supervised_user_settings =
+ SupervisedUserSettingsServiceFactory::GetForProfile(this);
+ scoped_ptr<content_settings::SupervisedProvider> supervised_provider(
+ new content_settings::SupervisedProvider(supervised_user_settings));
+ host_content_settings_map_->RegisterProvider(
+ HostContentSettingsMap::SUPERVISED_PROVIDER,
+ supervised_provider.Pass());
+#endif
}
return host_content_settings_map_.get();
}
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/supervised_user/supervised_user_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698