diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-07 03:51:07 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-07 03:51:07 +0000 |
commit | 9648acc57f91c642f03b97cdc6307c83500b2c9a (patch) | |
tree | ba0c894fb0a2dec798297a4ac0bfe22b0b5444a2 /chrome/browser/net | |
parent | 3a39f58027b3f4fc09b2b6c38b667fddca6bbdc5 (diff) | |
download | chromium_src-9648acc57f91c642f03b97cdc6307c83500b2c9a.zip chromium_src-9648acc57f91c642f03b97cdc6307c83500b2c9a.tar.gz chromium_src-9648acc57f91c642f03b97cdc6307c83500b2c9a.tar.bz2 |
Revert 58601 -
A lot of ui_tests flakiness started around that revision, I want to verify if this is the cause.
original comment:
Have the browser start connecting as soon as the navigation starts. This
seems trivial, but this gets the network going before we start the renderer
process creation, which can save 45+ms of latency.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3358011
TBR=mbelshe@chromium.org
Review URL: http://codereview.chromium.org/3325014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r-- | chrome/browser/net/connect_interceptor.cc | 9 | ||||
-rw-r--r-- | chrome/browser/net/predictor_api.cc | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/net/connect_interceptor.cc b/chrome/browser/net/connect_interceptor.cc index 945c0ec..ee34f4c 100644 --- a/chrome/browser/net/connect_interceptor.cc +++ b/chrome/browser/net/connect_interceptor.cc @@ -39,11 +39,10 @@ URLRequestJob* ConnectInterceptor::MaybeIntercept(URLRequest* request) { } LearnFromNavigation(referring_url, request_url); } - - // Subresources for main frames usually get loaded when we detected the main - // frame - way back in RenderViewHost::Navigate. So only use subresource - // prediction here for subframes. - if (request->load_flags() & net::LOAD_SUB_FRAME) + bool is_frame = 0 != (request->load_flags() & (net::LOAD_SUB_FRAME | + net::LOAD_MAIN_FRAME)); + // Now we use previous learning and setup for our subresources. + if (is_frame && !request->was_fetched_via_proxy()) PredictFrameSubresources(request->url().GetWithEmptyPath()); return NULL; } diff --git a/chrome/browser/net/predictor_api.cc b/chrome/browser/net/predictor_api.cc index e843adc..b5ab915 100644 --- a/chrome/browser/net/predictor_api.cc +++ b/chrome/browser/net/predictor_api.cc @@ -172,6 +172,7 @@ void AnticipateOmniboxUrl(const GURL& url, bool preconnectable) { } void PreconnectUrlAndSubresources(const GURL& url) { + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); if (!predictor_enabled || NULL == g_predictor) return; if (!url.is_valid() || !url.has_host()) |