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

Unified Diff: chrome/browser/io_thread.h

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome OS compile fix Created 9 years, 9 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/io_thread.h
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index d3bf4e70f5084e9a7ecc323a829fe66e408253ce..df7323751d8292dbfabf769855d04e21febe1679 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -19,7 +19,10 @@ class ChromeNetLog;
class ChromeURLRequestContextGetter;
class ExtensionEventRouterForwarder;
class ListValue;
+class PrefProxyConfigTracker;
class PrefService;
+class SystemURLRequestContextGetter;
+class URLRequestContextGetter;
namespace chrome_browser_net {
class ConnectInterceptor;
@@ -33,6 +36,7 @@ class HostResolver;
class HttpAuthHandlerFactory;
class HttpTransactionFactory;
class NetworkDelegate;
+class ProxyConfigService;
class ProxyScriptFetcher;
class ProxyService;
class SSLConfigService;
@@ -58,6 +62,12 @@ class IOThread : public BrowserProcessSubThread {
proxy_script_fetcher_http_transaction_factory;
scoped_ptr<net::URLSecurityManager> url_security_manager;
scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context;
+ scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory;
+ scoped_refptr<net::ProxyService> system_proxy_service;
+ // NOTE(willchan): This request context is unusable until a system
+ // SSLConfigService is provided that doesn't rely on
+ // Profiles. Do NOT use this yet.
+ scoped_refptr<net::URLRequestContext> system_request_context;
scoped_refptr<ExtensionEventRouterForwarder>
extension_event_router_forwarder;
};
@@ -104,6 +114,9 @@ class IOThread : public BrowserProcessSubThread {
// Handles changing to On The Record mode, discarding confidential data.
void ChangedToOnTheRecord();
+ // Returns a getter for the URLRequestContext. Only called on the UI thread.
+ scoped_refptr<URLRequestContextGetter> system_url_request_context_getter();
+
// Clear all network stack history, including the host cache, as well as
// speculative data about subresources of visited sites, and startup-time
// navigations.
@@ -114,11 +127,17 @@ class IOThread : public BrowserProcessSubThread {
virtual void CleanUp();
private:
+ friend class SystemURLRequestContextGetter;
Mattias Nissler (ping if slow) 2011/03/09 11:04:56 Why do we need this? Add a comment explaining this
battre 2011/03/09 19:24:07 Done.
+
static void RegisterPrefs(PrefService* local_state);
net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory(
net::HostResolver* resolver);
+ // Lazy initialization of system request context for
+ // SystemURLRequestContextGetter. To be called on IO thread.
+ void InitSystemRequestContext();
+
void InitNetworkPredictorOnIOThread(
bool prefetching_enabled,
base::TimeDelta max_dns_queue_delay,
@@ -179,6 +198,12 @@ class IOThread : public BrowserProcessSubThread {
// IOThread::CleanUp().
std::list<ChromeURLRequestContextGetter*> url_request_context_getters_;
+ scoped_refptr<URLRequestContextGetter> system_url_request_context_getter_;
+
+ scoped_ptr<net::ProxyConfigService> system_proxy_config_service_;
+
+ PrefProxyConfigTracker* pref_proxy_config_tracker_; // Weak pointer.
Mattias Nissler (ping if slow) 2011/03/09 11:04:56 If you never construct the system request context,
battre 2011/03/09 19:24:07 Done.
+
DISALLOW_COPY_AND_ASSIGN(IOThread);
};

Powered by Google App Engine
This is Rietveld 408576698