Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Issue 1585029: Support speculative pre-connection to search URLs (Closed)

Created:
10 years, 8 months ago by jar (doing other things)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Support speculative pre-connection to search URLs Implement several flavors of TCP/IP speculative preconnection under a command line flag (not yet on by default). The first area of preconnection takes place when a user types a query into the omnibox, as we preconnect to the search service when the omnibox suggests it is going to do a search. The second area involves subresources, such as images. When a navigation takes place, and we've seen navigations to that domain/port before, and the history-based probabability that we'll need to make a connection to a second site (host/port) is sufficiently large, then we preconnect to that second site while we are still connecting to the primary site (and before we've gotten content from the primary site. We also fall-back to mere DNS pre-resolution of subresource hostnames when the probability of a connection to the subresource is not high enough. BUG=42694 r=pkasting,willchan,mbelshe Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=47479

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Total comments: 55

Patch Set 15 : '' #

Total comments: 12

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Total comments: 6

Patch Set 20 : '' #

Patch Set 21 : '' #

Total comments: 3

Patch Set 22 : '' #

Total comments: 18

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Patch Set 26 : '' #

Total comments: 4

Patch Set 27 : '' #

Patch Set 28 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+951 lines, -441 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +21 lines, -1 line 0 comments Download
M chrome/browser/browser_main.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/browser_process_impl.cc View 23 24 25 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/io_thread.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/io_thread.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/net/dns_global.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/net/dns_global.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 21 chunks +100 lines, -37 lines 0 comments Download
M chrome/browser/net/dns_host_info.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +12 lines, -11 lines 0 comments Download
M chrome/browser/net/dns_host_info.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 9 chunks +14 lines, -15 lines 0 comments Download
M chrome/browser/net/dns_host_info_unittest.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/net/dns_master.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 chunks +41 lines, -29 lines 0 comments Download
M chrome/browser/net/dns_master.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 27 chunks +173 lines, -114 lines 0 comments Download
M chrome/browser/net/dns_master_unittest.cc View 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 16 chunks +248 lines, -164 lines 0 comments Download
A chrome/browser/net/preconnect.h View 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +40 lines, -0 lines 2 comments Download
A chrome/browser/net/preconnect.cc View 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +67 lines, -0 lines 0 comments Download
M chrome/browser/net/referrer.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +55 lines, -14 lines 0 comments Download
M chrome/browser/net/referrer.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +125 lines, -31 lines 0 comments Download
M chrome/chrome_browser.gypi View 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 15 16 17 18 19 20 21 22 1 chunk +2 lines, -2 lines 0 comments Download
MM net/base/host_port_pair.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +6 lines, -0 lines 0 comments Download
M net/base/host_port_pair.cc View 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
jar (doing other things)
This is mostly working I think (I still need some more unit tests, and a ...
10 years, 8 months ago (2010-04-28 01:23:03 UTC) #1
Peter Kasting
http://codereview.chromium.org/1585029/diff/55008/94004 File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/1585029/diff/55008/94004#newcode376 chrome/browser/autocomplete/autocomplete.h:376: // The type of this match is a search ...
10 years, 8 months ago (2010-04-28 05:08:06 UTC) #2
willchan no longer on Chromium
[ cc: eroman ] General comments: * You're making changes to the DNS prefetching system ...
10 years, 8 months ago (2010-04-28 18:23:10 UTC) #3
eroman
I haven't read this change yet, but my initial concern is how this is going ...
10 years, 8 months ago (2010-04-28 20:25:19 UTC) #4
willchan no longer on Chromium
On Wed, Apr 28, 2010 at 1:25 PM, <[email protected]> wrote: > I haven't read this ...
10 years, 8 months ago (2010-04-28 20:28:20 UTC) #5
mbelshe
On Wed, Apr 28, 2010 at 1:28 PM, William Chan (陈智昌) <[email protected]>wrote: > On Wed, ...
10 years, 7 months ago (2010-04-29 02:33:06 UTC) #6
Peter Kasting
http://codereview.chromium.org/1585029/diff/55008/94004 File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/1585029/diff/55008/94004#newcode376 chrome/browser/autocomplete/autocomplete.h:376: // The type of this match is a search ...
10 years, 7 months ago (2010-04-29 23:55:13 UTC) #7
jar (doing other things)
Response to willchan's "general comments":: On Wed, Apr 28, 2010 at 11:23 AM, <[email protected]> wrote: ...
10 years, 7 months ago (2010-04-30 02:00:04 UTC) #8
jar (doing other things)
Response to all of willchan and pkasting comments. I've also done a pile of "hand ...
10 years, 7 months ago (2010-04-30 02:02:27 UTC) #9
Peter Kasting
r-. http://codereview.chromium.org/1585029/diff/84004/111003 File chrome/browser/net/dns_global.cc (right): http://codereview.chromium.org/1585029/diff/84004/111003#newcode690 chrome/browser/net/dns_global.cc:690: static bool IsPreconnectableSearchType(const AutocompleteMatch& match) { This is ...
10 years, 7 months ago (2010-04-30 02:17:28 UTC) #10
Peter Kasting
On 2010/04/30 02:17:28, Peter Kasting wrote: > You may not check in with this. Please ...
10 years, 7 months ago (2010-04-30 05:00:11 UTC) #11
jar (doing other things)
I think this may have addressed Pkasting's comments. Mike: If you can review this, I'd ...
10 years, 7 months ago (2010-05-04 01:32:58 UTC) #12
Peter Kasting
LGTM http://codereview.chromium.org/1585029/diff/151002/146002 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/1585029/diff/151002/146002#newcode574 chrome/browser/autocomplete/autocomplete_edit.cc:574: UMA_HISTOGRAM_ENUMERATION("Autocomplete.MatchType", type, Are you sure you want this ...
10 years, 7 months ago (2010-05-04 02:01:16 UTC) #13
willchan no longer on Chromium
Oops, I noticed I didn't mail these out last week. I haven't read it again ...
10 years, 7 months ago (2010-05-04 02:16:54 UTC) #14
jar (doing other things)
More responses for WillChan and PKasting. Please look to newest CL version to insert comments. ...
10 years, 7 months ago (2010-05-04 08:24:49 UTC) #15
Peter Kasting
On 2010/05/04 08:24:49, jar wrote: > http://codereview.chromium.org/1585029/diff/151002/146002#newcode577 > chrome/browser/autocomplete/autocomplete_edit.cc:577: // These cases are for > ...
10 years, 7 months ago (2010-05-04 18:20:03 UTC) #16
jar (doing other things)
This (really) contains the one-line comment edit for pkasting. http://codereview.chromium.org/1585029/diff/184002/172003 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/1585029/diff/184002/172003#newcode582 chrome/browser/autocomplete/autocomplete_edit.cc:582: ...
10 years, 7 months ago (2010-05-04 18:36:39 UTC) #17
Peter Kasting
http://codereview.chromium.org/1585029/diff/184002/172003 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/1585029/diff/184002/172003#newcode582 chrome/browser/autocomplete/autocomplete_edit.cc:582: // engine (other than the default). On 2010/05/04 18:36:39, ...
10 years, 7 months ago (2010-05-04 18:50:20 UTC) #18
jar (doing other things)
Changes per PKasting's comments. http://codereview.chromium.org/1585029/diff/184002/172003 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/1585029/diff/184002/172003#newcode582 chrome/browser/autocomplete/autocomplete_edit.cc:582: // engine (other than the ...
10 years, 7 months ago (2010-05-04 19:47:37 UTC) #19
willchan no longer on Chromium
I need to look at this again. I'll do another pass tonight or tomorrow morning. ...
10 years, 7 months ago (2010-05-05 01:24:59 UTC) #20
jar (doing other things)
On Tue, May 4, 2010 at 6:24 PM, <[email protected]> wrote: > > What I mean ...
10 years, 7 months ago (2010-05-05 01:49:50 UTC) #21
willchan no longer on Chromium
On 2010/05/05 01:49:50, jar wrote: > On Tue, May 4, 2010 at 6:24 PM, <mailto:[email protected]> ...
10 years, 7 months ago (2010-05-05 18:29:10 UTC) #22
willchan no longer on Chromium
Apparently there are some lint errors, I haven't looked at them to see if they're ...
10 years, 7 months ago (2010-05-05 19:04:41 UTC) #23
Mike Belshe
http://codereview.chromium.org/1585029/diff/204001/172029 File chrome/browser/net/preconnect.cc (right): http://codereview.chromium.org/1585029/diff/204001/172029#newcode17 chrome/browser/net/preconnect.cc:17: net::TCPSocketParams params(hostport.host, hostport.port, net::LOW, We should think a little ...
10 years, 7 months ago (2010-05-12 21:21:52 UTC) #24
jar (doing other things)
Will, I've changed the preconnect.* files to release the handle_ asap. Please review these changes ...
10 years, 7 months ago (2010-05-15 07:03:42 UTC) #25
willchan no longer on Chromium
http://codereview.chromium.org/1585029/diff/204001/172029 File chrome/browser/net/preconnect.cc (right): http://codereview.chromium.org/1585029/diff/204001/172029#newcode17 chrome/browser/net/preconnect.cc:17: net::TCPSocketParams params(hostport.host, hostport.port, net::LOW, On 2010/05/15 07:03:42, jar wrote: ...
10 years, 7 months ago (2010-05-17 19:14:14 UTC) #26
jar (doing other things)
Two changes made per Will's suggestion. If I get an LGTM, I'll land its under ...
10 years, 7 months ago (2010-05-17 23:11:53 UTC) #27
willchan no longer on Chromium
LGTM http://codereview.chromium.org/1585029/diff/275001/258017 File chrome/browser/net/preconnect.h (right): http://codereview.chromium.org/1585029/diff/275001/258017#newcode13 chrome/browser/net/preconnect.h:13: #include "net/base/host_port_pair.h" I think you can forward declare ...
10 years, 7 months ago (2010-05-17 23:50:08 UTC) #28
jar (doing other things)
10 years, 7 months ago (2010-05-18 00:52:57 UTC) #29
Comment on Will's suggestion.

http://codereview.chromium.org/1585029/diff/275001/258017
File chrome/browser/net/preconnect.h (right):

http://codereview.chromium.org/1585029/diff/275001/258017#newcode13
chrome/browser/net/preconnect.h:13: #include "net/base/host_port_pair.h"
I'm going to migrate to using a canonicalized GURL (scheme, host, port only)
instead of host_port_pair, so I'll handle this stuff in the next patch.

Jim

On 2010/05/17 23:50:08, willchan wrote:
> I think you can forward declare net::HostPortPair and don't need the rest of
the
> net includes below this line.  Might need to move to the .cc.

Powered by Google App Engine
This is Rietveld 408576698