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

Unified Diff: chrome/browser/io_thread.h

Issue 7685009: Revert "Modifying prefetch to account for multi-profile." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/chrome_content_browser_client.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.h
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index 9340f39caca6c9a35c78759e7cc988b587937e8b..a2b42b577370ff460b69e260b3cd6b86e63b6f46 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -14,6 +14,7 @@
#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;
@@ -28,6 +29,11 @@ namespace base {
class ListValue;
}
+namespace chrome_browser_net {
+class ConnectInterceptor;
+class Predictor;
+} // namespace chrome_browser_net
+
namespace net {
class CertVerifier;
class CookieStore;
@@ -103,13 +109,28 @@ 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();
- // 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();
+ // 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();
protected:
virtual void Init();
@@ -131,6 +152,21 @@ 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();
@@ -172,6 +208,14 @@ 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_;
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698