summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-15 15:13:49 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-15 15:13:49 +0000
commitbff1f51a7aa9c3dd72711304b5f0f158de74d630 (patch)
tree0796aad39d2ca4b480c30249e6b709ffd38a5667 /chrome/browser/io_thread.cc
parent30ec247e0d99a0b084a65ba63a5789b3037aa94d (diff)
downloadchromium_src-bff1f51a7aa9c3dd72711304b5f0f158de74d630.zip
chromium_src-bff1f51a7aa9c3dd72711304b5f0f158de74d630.tar.gz
chromium_src-bff1f51a7aa9c3dd72711304b5f0f158de74d630.tar.bz2
Intercept navigations, not DNS resolutions, to predict startup
Transition from using a DNS observer, to using the TCP/IP connection interceptor (which is used for preconneciton and pre-resolution) to acquire the list of hosts to resolve at startup. BUG=42694 r=mbelshe Review URL: http://codereview.chromium.org/3169006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 21d71b3..54aaab2 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -133,7 +133,6 @@ IOThread::IOThread()
: BrowserProcessSubThread(ChromeThread::IO),
globals_(NULL),
speculative_interceptor_(NULL),
- prefetch_observer_(NULL),
predictor_(NULL) {}
IOThread::~IOThread() {
@@ -217,13 +216,6 @@ void IOThread::CleanUp() {
delete speculative_interceptor_;
speculative_interceptor_ = NULL;
- // Not initialized in Init(). May not be initialized.
- if (prefetch_observer_) {
- globals_->host_resolver->RemoveObserver(prefetch_observer_);
- delete prefetch_observer_;
- prefetch_observer_ = NULL;
- }
-
// TODO(eroman): hack for http://crbug.com/15513
if (globals_->host_resolver->GetAsHostResolverImpl()) {
globals_->host_resolver.get()->GetAsHostResolverImpl()->Shutdown();
@@ -335,15 +327,7 @@ void IOThread::InitNetworkPredictorOnIOThread(
DCHECK(!speculative_interceptor_);
speculative_interceptor_ = new chrome_browser_net::ConnectInterceptor;
- // TODO(jar): We can completely replace prefetch_observer with
- // speculative_interceptor.
- // Prefetch_observer is used to monitor initial resolutions.
- DCHECK(!prefetch_observer_);
- prefetch_observer_ = chrome_browser_net::CreateResolverObserver();
- globals_->host_resolver->AddObserver(prefetch_observer_);
-
- FinalizePredictorInitialization(
- predictor_, prefetch_observer_, startup_urls, referral_list);
+ FinalizePredictorInitialization(predictor_, startup_urls, referral_list);
}
void IOThread::ChangedToOnTheRecordOnIOThread() {