diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 01:30:46 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 01:30:46 +0000 |
commit | 67372ecfa788fa29193f94029f9eccac2c08af0f (patch) | |
tree | e99301edd0e3b874600d3fbcdede208e35adcbdb /chrome/browser/io_thread.h | |
parent | 29adff69903acfae6aca00ba41b185d143f57f35 (diff) | |
download | chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.zip chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.tar.gz chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.tar.bz2 |
Modifying prefetch to account for multi-profile.
Items of note:
- predictor_api is gone. Most functions in predictor_api.cc have moved into the chrome_browser_net::Predictor class or the Profile class.
- The predictor state is cleaned up in the Profile dtor.
- Predictor is owned by the ProfileIOData of the profile.
- InitialObserver class is gone since each profile keeps their own info, the non-OTR don't care if anyone is OTR.
- Predictor is created by the profile and then passed to the ProfileIOData. Then its initialization is finished on the IOThread.
- ConnectInterceptor now subclasses off of UrlRequestJobFactory::Interceptor.
- Updated Profile to create a SimpleShutdownPredictor with limited functionality when in unittests.
BUG=89937,90114
TEST=passes existing
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97446
Review URL: http://codereview.chromium.org/7467012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.h')
-rw-r--r-- | chrome/browser/io_thread.h | 52 |
1 files changed, 4 insertions, 48 deletions
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index a2b42b5..9340f39 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -14,7 +14,6 @@ #include "chrome/browser/browser_process_sub_thread.h" #include "chrome/browser/net/ssl_config_service_manager.h" #include "chrome/browser/prefs/pref_member.h" -#include "chrome/common/net/predictor_common.h" #include "net/base/network_change_notifier.h" class ChromeNetLog; @@ -29,11 +28,6 @@ namespace base { class ListValue; } -namespace chrome_browser_net { -class ConnectInterceptor; -class Predictor; -} // namespace chrome_browser_net - namespace net { class CertVerifier; class CookieStore; @@ -109,28 +103,13 @@ class IOThread : public BrowserProcessSubThread { ChromeNetLog* net_log(); - // Initializes the network predictor, which induces DNS pre-resolution and/or - // TCP/IP preconnections. |prefetching_enabled| indicates whether or not DNS - // prefetching should be enabled, and |preconnect_enabled| controls whether - // TCP/IP preconnection is enabled. This should be called by the UI thread. - // It will post a task to the IO thread to perform the actual initialization. - void InitNetworkPredictor(bool prefetching_enabled, - base::TimeDelta max_dns_queue_delay, - size_t max_speculative_parallel_resolves, - const chrome_common_net::UrlList& startup_urls, - base::ListValue* referral_list, - bool preconnect_enabled); - - // Handles changing to On The Record mode, discarding confidential data. - void ChangedToOnTheRecord(); - // Returns a getter for the URLRequestContext. Only called on the UI thread. net::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. - void ClearNetworkingHistory(); + // Clears the host cache. Intended to be used to prevent exposing recently + // visited sites on about:net-internals/#dns and about:dns pages. Must be + // called on the IO thread. + void ClearHostCache(); protected: virtual void Init(); @@ -152,21 +131,6 @@ class IOThread : public BrowserProcessSubThread { // SystemURLRequestContextGetter. To be called on IO thread. void InitSystemRequestContextOnIOThread(); - void InitNetworkPredictorOnIOThread( - bool prefetching_enabled, - base::TimeDelta max_dns_queue_delay, - size_t max_speculative_parallel_resolves, - const chrome_common_net::UrlList& startup_urls, - base::ListValue* referral_list, - bool preconnect_enabled); - - void ChangedToOnTheRecordOnIOThread(); - - // Clears the host cache. Intended to be used to prevent exposing recently - // visited sites on about:net-internals/#dns and about:dns pages. Must be - // called on the IO thread. - void ClearHostCache(); - // Returns an SSLConfigService instance. net::SSLConfigService* GetSSLConfigService(); @@ -208,14 +172,6 @@ class IOThread : public BrowserProcessSubThread { // These member variables are initialized by a task posted to the IO thread, // which gets posted by calling certain member functions of IOThread. - - // Note: we user explicit pointers rather than smart pointers to be more - // explicit about destruction order, and ensure that there is no chance that - // these observers would be used accidentally after we have begun to tear - // down. - chrome_browser_net::ConnectInterceptor* speculative_interceptor_; - chrome_browser_net::Predictor* predictor_; - scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |