summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/predictor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/net/predictor.cc')
-rw-r--r--chrome/browser/net/predictor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 46dcf1f..327d709 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -133,7 +133,6 @@ void Predictor::LearnFromNavigation(const GURL& referring_url,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(referring_url == referring_url.GetWithEmptyPath());
DCHECK(target_url == target_url.GetWithEmptyPath());
- DCHECK(target_url != referring_url);
if (referring_url.has_host()) {
referrers_[referring_url].SuggestHost(target_url);
}
@@ -258,6 +257,8 @@ void Predictor::PrepareFrameSubresources(const GURL& url) {
evalution = PRECONNECTION;
future_url->second.IncrementPreconnectionCount();
int count = static_cast<int>(std::ceil(connection_expectation));
+ if (url.host() == future_url->first.host())
+ ++count;
Preconnect::PreconnectOnIOThread(future_url->first, motivation, count);
} else if (connection_expectation > kDNSPreresolutionWorthyExpectedValue) {
evalution = PRERESOLUTION;