| Index: chrome/browser/net/predictor.cc
|
| diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
|
| index 06f167ba631ba6e655394fbd9d5006487eec46b9..61d534a34c186e52058be945f682932b366bc30e 100644
|
| --- a/chrome/browser/net/predictor.cc
|
| +++ b/chrome/browser/net/predictor.cc
|
| @@ -262,8 +262,10 @@ void Predictor::AnticipateOmniboxUrl(const GURL& url, bool preconnectable) {
|
| return; // We've done a preconnect recently.
|
| last_omnibox_preconnect_ = now;
|
| const int kConnectionsNeeded = 1;
|
| - PreconnectUrl(
|
| - CanonicalizeUrl(url), GURL(), motivation, kConnectionsNeeded);
|
| + PreconnectUrl(CanonicalizeUrl(url),
|
| + GURL(),
|
| + motivation,
|
| + kConnectionsNeeded);
|
| return; // Skip pre-resolution, since we'll open a connection.
|
| }
|
| } else {
|
| @@ -837,19 +839,24 @@ void Predictor::SaveDnsPrefetchStateForNextStartupAndTrim(
|
| void Predictor::PreconnectUrl(const GURL& url,
|
| const GURL& first_party_for_cookies,
|
| UrlInfo::ResolutionMotivation motivation,
|
| - int count) {
|
| + int count,
|
| + bool isAnonymous) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
| BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
|
| if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
|
| - PreconnectUrlOnIOThread(url, first_party_for_cookies, motivation, count);
|
| + PreconnectUrlOnIOThread(url,
|
| + first_party_for_cookies,
|
| + motivation,
|
| + count,
|
| + isAnonymous);
|
| } else {
|
| BrowserThread::PostTask(
|
| BrowserThread::IO,
|
| FROM_HERE,
|
| base::Bind(&Predictor::PreconnectUrlOnIOThread,
|
| base::Unretained(this), url, first_party_for_cookies,
|
| - motivation, count));
|
| + motivation, count, isAnonymous));
|
| }
|
| }
|
|
|
| @@ -857,7 +864,8 @@ void Predictor::PreconnectUrlOnIOThread(
|
| const GURL& original_url,
|
| const GURL& first_party_for_cookies,
|
| UrlInfo::ResolutionMotivation motivation,
|
| - int count) {
|
| + int count,
|
| + bool isAnonymous) {
|
| // Skip the HSTS redirect.
|
| GURL url = GetHSTSRedirectOnIOThread(original_url);
|
|
|
| @@ -870,7 +878,8 @@ void Predictor::PreconnectUrlOnIOThread(
|
| first_party_for_cookies,
|
| motivation,
|
| count,
|
| - url_request_context_getter_.get());
|
| + url_request_context_getter_.get(),
|
| + isAnonymous);
|
| }
|
|
|
| void Predictor::PredictFrameSubresources(const GURL& url,
|
|
|