Index: chrome/browser/profiles/profile_io_data.cc |
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
index 44f2819bdddffc8d6480113c058c8893666e088b..e603067a26a4905dd834f4407ac05322f9fac98b 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -70,6 +70,12 @@ |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_job_factory_impl.h" |
+#if defined(ENABLE_MANAGED_USERS) |
+#include "chrome/browser/managed_mode/managed_mode_url_filter.h" |
+#include "chrome/browser/managed_mode/managed_user_service.h" |
+#include "chrome/browser/managed_mode/managed_user_service_factory.h" |
+#endif |
+ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/drive/drive_protocol_handler.h" |
#include "chrome/browser/chromeos/proxy_config_service_impl.h" |
@@ -182,6 +188,13 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
params->proxy_config_service.reset(proxy_config_service); |
profile->GetProxyConfigTracker()->SetChromeProxyConfigService( |
proxy_config_service); |
+#if defined(ENABLE_MANAGED_USERS) |
+ ManagedUserService* managed_user_service = |
+ ManagedUserServiceFactory::GetForProfile(profile); |
+ params->managed_mode_url_filter = |
+ managed_user_service->GetURLFilterForIOThread(); |
+#endif |
+ |
params->profile = profile; |
profile_params_.reset(params.release()); |
@@ -590,6 +603,10 @@ void ProfileIOData::LazyInitialize() const { |
profile_params_->resource_prefetch_predictor_observer_.release()); |
} |
+#if defined(ENABLE_MANAGED_USERS) |
+ managed_mode_url_filter_ = profile_params_->managed_mode_url_filter; |
+#endif |
+ |
LazyInitializeInternal(profile_params_.get()); |
profile_params_.reset(); |