Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Issue 2004453002: Add a Dns preresolve interface in //content (Closed)

Created:
4 years, 7 months ago by Charlie Harrison
Modified:
4 years, 6 months ago
Reviewers:
kinuko, achuithb, eroman
CC:
cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, Julia Tuttle, loading-reviews_chromium.org, Randy Smith (Not in Mondays)
Base URL:
https://chromium.googlesource.com/chromium/src.git@predictor_dns_browsertest
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a Dns preresolve interface in //content This patch adds a preresolve interface in //content, with the sole consumer being the predictor in //chrome/browser/net. This is in preparation for sending resource hints from Blink to //content. The requests are routed through the ResourceHintsController, which is scoped to the RDHI. The controller keeps track of each request until completion, and calls a consumer-supplied callback. Note: this change also makes all dns preresolves by the predictor use a lower priority (net::IDLE) than the priority they had previously been using (net::DEFAULT_PRIORITY). TBR=kinuko@chromium.org BUG=610750, 614350 Committed: https://crrev.com/f848daf2b342548c8ec90b21396097339688819a Cr-Commit-Position: refs/heads/master@{#397250}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix comment and add necessary include #

Total comments: 10

Patch Set 3 : kinuko@ review #

Patch Set 4 : Changed interface to accept ResourceContexts #

Total comments: 8

Patch Set 5 : safe callbacks #

Total comments: 2

Patch Set 6 : remove controller class #

Total comments: 8

Patch Set 7 : achuithb@ review: cleaned up predictor of NULLs and simplified auth_prewarmer getting signin Resour… #

Total comments: 2

Patch Set 8 : null checks => DCHECKs #

Patch Set 9 : rebase on 396447 #

Patch Set 10 : Fix error with base::Passed #

Total comments: 6

Patch Set 11 : eroman@ review. use base::Owned instead of changine single_request_host_resolver #

Total comments: 2

Patch Set 12 : Move AddressList to unique_ptr #

Total comments: 2

Patch Set 13 : this time just use base::Owned for everything #

Patch Set 14 : rebase on #397108 #

Total comments: 1

Patch Set 15 : Comment change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -120 lines) Patch
M chrome/browser/chromeos/login/auth/auth_prewarmer.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/predictor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +5 lines, -16 lines 0 comments Download
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 chunks +40 lines, -93 lines 0 comments Download
M content/browser/loader/resource_hints_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +40 lines, -6 lines 0 comments Download
M content/public/browser/resource_hints.h View 1 2 3 2 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 65 (22 generated)
Charlie Harrison
PTAL. Note that the interface into //content is very simplified (no sending priorities, etc.). I ...
4 years, 7 months ago (2016-05-20 16:30:26 UTC) #4
kinuko
https://codereview.chromium.org/2004453002/diff/20001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/20001/content/browser/loader/resource_hints_impl.cc#newcode68 content/browser/loader/resource_hints_impl.cc:68: if (!dispatcher_host) When could this happen?? https://codereview.chromium.org/2004453002/diff/20001/content/browser/loader/resource_hints_impl.h File content/browser/loader/resource_hints_impl.h ...
4 years, 7 months ago (2016-05-23 14:07:27 UTC) #5
Charlie Harrison
Please take another look. Responded to comments and changed the interface to use ResourceContexts. https://codereview.chromium.org/2004453002/diff/20001/content/browser/loader/resource_hints_impl.cc ...
4 years, 7 months ago (2016-05-23 17:12:30 UTC) #6
Randy Smith (Not in Mondays)
cc juliatuttle@ FHI (not a review request; I think this is mostly a routing issue, ...
4 years, 7 months ago (2016-05-23 19:57:20 UTC) #7
kinuko
Generally looking good, I have a few questions about object lifetime... https://codereview.chromium.org/2004453002/diff/60001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): ...
4 years, 7 months ago (2016-05-24 09:15:27 UTC) #8
Charlie Harrison
Thanks for the detailed review, I think both those callbacks were a bit problematic and ...
4 years, 7 months ago (2016-05-24 13:14:22 UTC) #9
kinuko
https://codereview.chromium.org/2004453002/diff/60001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2004453002/diff/60001/chrome/browser/net/predictor.cc#newcode1084 chrome/browser/net/predictor.cc:1084: base::Bind(&Predictor::OnLookupFinished, base::Unretained(this), url)); On 2016/05/24 13:14:22, csharrison wrote: > ...
4 years, 7 months ago (2016-05-24 14:38:34 UTC) #10
Charlie Harrison
Thanks. I've updated the description to track 614350, as hopefully we'll fix that crasher with ...
4 years, 7 months ago (2016-05-24 16:06:36 UTC) #12
Charlie Harrison
+achuith@chromium.org: Can you look at the changes to auth_prewarmer? I had to modify the interface ...
4 years, 7 months ago (2016-05-24 16:08:21 UTC) #14
achuithb
lgtm
4 years, 7 months ago (2016-05-24 20:36:20 UTC) #15
achuithb
On 2016/05/24 20:36:20, achuithb wrote: > lgtm To be clear, only looked at auth_prewarmer, please ...
4 years, 7 months ago (2016-05-24 20:37:00 UTC) #16
kinuko
https://codereview.chromium.org/2004453002/diff/80001/content/browser/loader/resource_hints_controller.h File content/browser/loader/resource_hints_controller.h (right): https://codereview.chromium.org/2004453002/diff/80001/content/browser/loader/resource_hints_controller.h#newcode31 content/browser/loader/resource_hints_controller.h:31: int result); It looks both DnsRequest and OnResolveComplete can ...
4 years, 7 months ago (2016-05-25 02:07:04 UTC) #17
Charlie Harrison
https://codereview.chromium.org/2004453002/diff/80001/content/browser/loader/resource_hints_controller.h File content/browser/loader/resource_hints_controller.h (right): https://codereview.chromium.org/2004453002/diff/80001/content/browser/loader/resource_hints_controller.h#newcode31 content/browser/loader/resource_hints_controller.h:31: int result); On 2016/05/25 02:07:04, kinuko wrote: > It ...
4 years, 7 months ago (2016-05-25 12:20:14 UTC) #18
Charlie Harrison
achuithb@, just verifying that you also looked at the other files in chromeos/?
4 years, 7 months ago (2016-05-25 20:09:53 UTC) #19
achuithb
https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc File chrome/browser/chromeos/login/auth/auth_prewarmer.cc (right): https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc#newcode99 chrome/browser/chromeos/login/auth/auth_prewarmer.cc:99: base::Bind(&content::PreconnectUrl, login::GetSigninResourceContext(), Why not ProfileHelper::GetSigninProfile()->GetResourceContext() here? https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/chromeos/login/helper.h File chrome/browser/chromeos/login/helper.h ...
4 years, 7 months ago (2016-05-25 21:17:10 UTC) #20
Charlie Harrison
Thanks for the second pass. https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc File chrome/browser/chromeos/login/auth/auth_prewarmer.cc (right): https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc#newcode99 chrome/browser/chromeos/login/auth/auth_prewarmer.cc:99: base::Bind(&content::PreconnectUrl, login::GetSigninResourceContext(), On 2016/05/25 ...
4 years, 7 months ago (2016-05-25 21:36:19 UTC) #21
achuithb
https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/net/predictor.cc#newcode110 chrome/browser/net/predictor.cc:110: user_prefs_(NULL), On 2016/05/25 21:36:19, csharrison wrote: > On 2016/05/25 ...
4 years, 7 months ago (2016-05-25 21:54:32 UTC) #22
Charlie Harrison
https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2004453002/diff/100001/chrome/browser/net/predictor.cc#newcode110 chrome/browser/net/predictor.cc:110: user_prefs_(NULL), On 2016/05/25 21:54:32, achuithb wrote: > On 2016/05/25 ...
4 years, 7 months ago (2016-05-25 22:06:55 UTC) #23
kinuko
lgtm https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc#newcode87 content/browser/loader/resource_hints_impl.cc:87: return net::ERR_FAILED; This could happen.. in some tests? ...
4 years, 7 months ago (2016-05-25 23:25:18 UTC) #24
Charlie Harrison
Thanks! https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc#newcode87 content/browser/loader/resource_hints_impl.cc:87: return net::ERR_FAILED; On 2016/05/25 23:25:18, kinuko wrote: > ...
4 years, 7 months ago (2016-05-26 00:46:55 UTC) #25
Charlie Harrison
Thanks! https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/120001/content/browser/loader/resource_hints_impl.cc#newcode87 content/browser/loader/resource_hints_impl.cc:87: return net::ERR_FAILED; On 2016/05/25 23:25:18, kinuko wrote: > ...
4 years, 7 months ago (2016-05-26 00:46:56 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/140001
4 years, 6 months ago (2016-05-27 12:27:25 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/12535) ios-device-gn on ...
4 years, 6 months ago (2016-05-27 12:29:23 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/160001
4 years, 6 months ago (2016-05-27 13:33:00 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/220900)
4 years, 6 months ago (2016-05-27 14:49:49 UTC) #34
Charlie Harrison
+eroman, for overall review and OWNERS for chrome/browser/net. moving rdsmith to cc. Looks like Win ...
4 years, 6 months ago (2016-05-27 17:36:00 UTC) #36
Charlie Harrison
It seems like the win errors were from using the DnsRequest after it was base::Passed ...
4 years, 6 months ago (2016-05-31 17:28:44 UTC) #37
eroman
https://codereview.chromium.org/2004453002/diff/180001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc File chrome/browser/chromeos/login/auth/auth_prewarmer.cc (right): https://codereview.chromium.org/2004453002/diff/180001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc#newcode100 chrome/browser/chromeos/login/auth/auth_prewarmer.cc:100: ProfileHelper::GetSigninProfile()->GetResourceContext(), url, why this change? (i.e. as opposed to ...
4 years, 6 months ago (2016-05-31 20:45:27 UTC) #38
Charlie Harrison
Thanks for the review. https://codereview.chromium.org/2004453002/diff/180001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc File chrome/browser/chromeos/login/auth/auth_prewarmer.cc (right): https://codereview.chromium.org/2004453002/diff/180001/chrome/browser/chromeos/login/auth/auth_prewarmer.cc#newcode100 chrome/browser/chromeos/login/auth/auth_prewarmer.cc:100: ProfileHelper::GetSigninProfile()->GetResourceContext(), url, On 2016/05/31 20:45:27, ...
4 years, 6 months ago (2016-05-31 21:14:47 UTC) #39
eroman
lgtm https://codereview.chromium.org/2004453002/diff/200001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/200001/content/browser/loader/resource_hints_impl.cc#newcode30 content/browser/loader/resource_hints_impl.cc:30: // that information. Note that |addresses| will be ...
4 years, 6 months ago (2016-05-31 22:09:56 UTC) #40
Charlie Harrison
Thanks! Moving kinuko@ to TBR for the small changes to fix the base::Passed bug. https://codereview.chromium.org/2004453002/diff/200001/content/browser/loader/resource_hints_impl.cc ...
4 years, 6 months ago (2016-05-31 22:30:01 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/220001
4 years, 6 months ago (2016-05-31 22:30:50 UTC) #44
eroman
https://codereview.chromium.org/2004453002/diff/220001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/220001/content/browser/loader/resource_hints_impl.cc#newcode89 content/browser/loader/resource_hints_impl.cc:89: new net::SingleRequestHostResolver(resource_context->GetHostResolver()); style: a different approach is used for ...
4 years, 6 months ago (2016-05-31 23:03:28 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/222278)
4 years, 6 months ago (2016-06-01 00:28:07 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/220001
4 years, 6 months ago (2016-06-01 02:16:13 UTC) #50
Charlie Harrison
https://codereview.chromium.org/2004453002/diff/220001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/220001/content/browser/loader/resource_hints_impl.cc#newcode89 content/browser/loader/resource_hints_impl.cc:89: new net::SingleRequestHostResolver(resource_context->GetHostResolver()); On 2016/05/31 23:03:28, eroman wrote: > style: ...
4 years, 6 months ago (2016-06-01 02:18:15 UTC) #52
Charlie Harrison
Alright I've changed both cases to use base::Owned.
4 years, 6 months ago (2016-06-01 12:25:50 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/260001
4 years, 6 months ago (2016-06-01 12:26:22 UTC) #55
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-01 14:05:08 UTC) #57
eroman
lgtm https://codereview.chromium.org/2004453002/diff/260001/content/browser/loader/resource_hints_impl.cc File content/browser/loader/resource_hints_impl.cc (right): https://codereview.chromium.org/2004453002/diff/260001/content/browser/loader/resource_hints_impl.cc#newcode25 content/browser/loader/resource_hints_impl.cc:25: // Note that |request| and |addresses| will be ...
4 years, 6 months ago (2016-06-01 15:27:38 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004453002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004453002/280001
4 years, 6 months ago (2016-06-01 19:59:37 UTC) #61
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 6 months ago (2016-06-01 21:28:16 UTC) #63
commit-bot: I haz the power
4 years, 6 months ago (2016-06-01 21:30:18 UTC) #65
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/f848daf2b342548c8ec90b21396097339688819a
Cr-Commit-Position: refs/heads/master@{#397250}

Powered by Google App Engine
This is Rietveld 408576698