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

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

Issue 7716003: WIP: URL blacklisting by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed Created 9 years, 4 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e60dd6bd2ac042c1c15181c0719bc7819059078d..44e0e20e8cc77bfc1e995d0772d2eefd548f6717 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/net/pref_proxy_config_service.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
+#include "chrome/browser/policy/url_blacklist_manager.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/profiles/profile.h"
@@ -243,6 +244,11 @@ void ProfileIOData::InitializeProfileParams(Profile* profile) {
base::Bind(&GetPrerenderManagerOnUI, profile_getter);
params->protocol_handler_registry = profile->GetProtocolHandlerRegistry();
+#if defined(ENABLE_CONFIGURATION_POLICY)
+ params->url_blacklist_manager.reset(
+ new policy::URLBlacklistManager(profile));
+#endif
+
params->proxy_config_service.reset(
ProxyServiceFactory::CreateProxyConfigService(
profile->GetProxyConfigTracker()));
@@ -404,6 +410,7 @@ void ProfileIOData::LazyInitialize() const {
network_delegate_.reset(new ChromeNetworkDelegate(
io_thread_globals->extension_event_router_forwarder.get(),
profile_params_->extension_info_map,
+ profile_params_->url_blacklist_manager.get(),
profile_params_->profile,
&enable_referrers_));
@@ -473,6 +480,7 @@ void ProfileIOData::LazyInitialize() const {
notification_service_ = profile_params_->notification_service;
extension_info_map_ = profile_params_->extension_info_map;
prerender_manager_getter_ = profile_params_->prerender_manager_getter;
+ url_blacklist_manager_.swap(profile_params_->url_blacklist_manager);
resource_context_.set_host_resolver(io_thread_globals->host_resolver.get());
resource_context_.set_request_context(main_request_context_);
@@ -487,6 +495,9 @@ void ProfileIOData::LazyInitialize() const {
resource_context_.set_media_observer(
io_thread_globals->media.media_internals.get());
+ if (url_blacklist_manager_.get())
+ url_blacklist_manager_->InitializeOnIOThread();
+
LazyInitializeInternal(profile_params_.get());
profile_params_.reset();
@@ -509,6 +520,8 @@ void ProfileIOData::ShutdownOnUIThread() {
enable_referrers_.Destroy();
clear_local_state_on_exit_.Destroy();
safe_browsing_enabled_.Destroy();
+ if (url_blacklist_manager_.get())
+ url_blacklist_manager_->ShutdownOnUIThread();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698