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

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

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
===================================================================
--- chrome/browser/profiles/profile_io_data.cc (revision 104227)
+++ chrome/browser/profiles/profile_io_data.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/chrome_network_delegate.h"
+#include "chrome/browser/net/http_server_properties_manager.h"
#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"
@@ -255,14 +256,17 @@
params->profile = profile;
profile_params_.reset(params.release());
- // The URLBlacklistManager has to be created on the UI thread to register
- // observers of |pref_service|, and it also has to clean up on
- // ShutdownOnUIThread to release these observers on the right thread.
- // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
- // in particular when this ProfileIOData isn't |initialized_| during deletion.
+ // URLBlacklistManager and HttpServerPropertiesManager have to be created on
+ // the UI thread to register observers of |pref_service|, and it also has to
+ // clean up on ShutdownOnUIThread to release these observers on the right
+ // thread. Don't pass it in |profile_params_| to make sure it is correctly
+ // cleaned up, in particular when this ProfileIOData isn't |initialized_|
+ // during deletion.
#if defined(ENABLE_CONFIGURATION_POLICY)
url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service));
#endif
+ http_server_properties_manager_.reset(
+ new chrome_browser_net::HttpServerPropertiesManager(pref_service));
}
ProfileIOData::AppRequestContext::AppRequestContext() {}
@@ -408,6 +412,9 @@
IOThread::Globals* const io_thread_globals = io_thread->globals();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (http_server_properties_manager_.get())
+ http_server_properties_manager_->InitializeOnIOThread();
+
// Create the common request contexts.
main_request_context_ = new ChromeURLRequestContext;
extensions_request_context_ = new ChromeURLRequestContext;
@@ -538,6 +545,8 @@
if (url_blacklist_manager_.get())
url_blacklist_manager_->ShutdownOnUIThread();
#endif
+ if (http_server_properties_manager_.get())
+ http_server_properties_manager_->ShutdownOnUIThread();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(

Powered by Google App Engine
This is Rietveld 408576698