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

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

Issue 11826059: Add ManagedUserService for profile-specific managed user data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 7 years, 11 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_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();

Powered by Google App Engine
This is Rietveld 408576698