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

Issue 1857383002: Refactor net predictor to use ResourceThrottles (Closed)

Created:
4 years, 8 months ago by Charlie Harrison
Modified:
4 years, 6 months ago
Reviewers:
sky, mmenke
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor net predictor to use ResourceThrottles The predictor currently hooks into ChromeNetworkDelegate for callbacks. This patch reduces the number of moving parts by attaching a throttle for resources coming into the RDHD. BUG=601254 Committed: https://crrev.com/cb0f401524eb0009f583f8bb63959115013bf1a4 Cr-Commit-Position: refs/heads/master@{#396988}

Patch Set 1 #

Patch Set 2 : bad dcheck #

Patch Set 3 : #

Total comments: 24

Patch Set 4 : comments + code cleanup #

Total comments: 1

Patch Set 5 : more comment changes #

Total comments: 14

Patch Set 6 : mmenke@ review + additional test #

Total comments: 27

Patch Set 7 : Add another test, mmenke@ review #

Patch Set 8 : Fix test #

Total comments: 14

Patch Set 9 : Comments + name changes #

Patch Set 10 : rebase on #396550 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -187 lines) Patch
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 4 5 6 7 8 9 3 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 8 9 3 chunks +0 lines, -10 lines 0 comments Download
D chrome/browser/net/connect_interceptor.h View 1 2 3 1 chunk +0 lines, -50 lines 0 comments Download
D chrome/browser/net/connect_interceptor.cc View 1 chunk +0 lines, -98 lines 0 comments Download
M chrome/browser/net/predictor.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/net/predictor_browsertest.cc View 1 2 3 4 5 6 7 8 9 9 chunks +125 lines, -12 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/predictor_resource_throttle.h View 1 2 3 4 5 6 7 8 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/predictor_resource_throttle.cc View 1 2 3 4 5 6 7 8 1 chunk +124 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 42 (11 generated)
Charlie Harrison
This can be your lowest priority review! I'd appreciate high level feedback on: - Exposing ...
4 years, 8 months ago (2016-04-06 21:05:35 UTC) #3
mmenke
On 2016/04/06 21:05:35, csharrison wrote: > This can be your lowest priority review! > > ...
4 years, 8 months ago (2016-04-06 21:15:00 UTC) #4
mmenke
https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/profiles/profile_io_data.h#newcode249 chrome/browser/profiles/profile_io_data.h:249: virtual chrome_browser_net::Predictor* predictor(); As a virtual method, this should ...
4 years, 8 months ago (2016-04-07 22:12:50 UTC) #6
Charlie Harrison
Thanks for the detailed review! I have one question about the redirects. https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc ...
4 years, 8 months ago (2016-04-07 22:20:41 UTC) #7
mmenke
https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc (right): https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/renderer_host/predictor_resource_throttle.cc#newcode84 chrome/browser/renderer_host/predictor_resource_throttle.cc:84: predictor_->timed_cache()->SetRecentlySeen(new_scheme_host); On 2016/04/07 22:20:41, csharrison wrote: > On 2016/04/07 ...
4 years, 8 months ago (2016-04-07 22:40:00 UTC) #8
mmenke
I feel we should really take this opportunity to add some test coverage to the ...
4 years, 8 months ago (2016-04-08 17:40:35 UTC) #9
Charlie Harrison
Yes! I am not planning on landing this without adding some tests. Thanks for the ...
4 years, 8 months ago (2016-04-08 17:42:43 UTC) #10
Charlie Harrison
Can we revisit this one when you've got time? https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1857383002/diff/40001/chrome/browser/profiles/profile_io_data.h#newcode249 chrome/browser/profiles/profile_io_data.h:249: ...
4 years, 7 months ago (2016-05-23 14:16:21 UTC) #11
mmenke
Shockingly, I have no review backlog today.... So far. https://codereview.chromium.org/1857383002/diff/80001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1857383002/diff/80001/chrome/browser/profiles/profile_io_data.cc#newcode1343 chrome/browser/profiles/profile_io_data.cc:1343: ...
4 years, 7 months ago (2016-05-23 18:50:22 UTC) #12
Charlie Harrison
PTAL. I also updated the logic so that we don't learn or predict any subresource ...
4 years, 7 months ago (2016-05-23 21:13:32 UTC) #13
mmenke
https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/net/predictor_browsertest.cc File chrome/browser/net/predictor_browsertest.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/net/predictor_browsertest.cc#newcode83 chrome/browser/net/predictor_browsertest.cc:83: Here's another extra line break for you to remove. ...
4 years, 7 months ago (2016-05-24 20:27:35 UTC) #14
mmenke
https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc#newcode54 chrome/browser/renderer_host/predictor_resource_throttle.cc:54: predictor_->LearnAboutInitialNavigation(request_scheme_host); On 2016/05/24 20:27:34, mmenke wrote: > Also, worth ...
4 years, 7 months ago (2016-05-24 21:39:32 UTC) #15
Charlie Harrison
Thanks! https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/net/predictor_browsertest.cc File chrome/browser/net/predictor_browsertest.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/net/predictor_browsertest.cc#newcode83 chrome/browser/net/predictor_browsertest.cc:83: On 2016/05/24 20:27:34, mmenke wrote: > Here's another ...
4 years, 7 months ago (2016-05-24 21:43:22 UTC) #16
mmenke
Quick response. Hope to sign off on this today, but may not happen until tomorrow. ...
4 years, 7 months ago (2016-05-25 14:57:49 UTC) #17
Charlie Harrison
https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc#newcode54 chrome/browser/renderer_host/predictor_resource_throttle.cc:54: predictor_->LearnAboutInitialNavigation(request_scheme_host); On 2016/05/25 14:57:48, mmenke wrote: > On 2016/05/24 ...
4 years, 7 months ago (2016-05-25 15:01:08 UTC) #18
mmenke
https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc#newcode54 chrome/browser/renderer_host/predictor_resource_throttle.cc:54: predictor_->LearnAboutInitialNavigation(request_scheme_host); On 2016/05/25 15:01:08, csharrison wrote: > On 2016/05/25 ...
4 years, 7 months ago (2016-05-25 15:21:20 UTC) #19
mmenke
https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc File chrome/browser/renderer_host/predictor_resource_throttle.cc (right): https://codereview.chromium.org/1857383002/diff/100001/chrome/browser/renderer_host/predictor_resource_throttle.cc#newcode54 chrome/browser/renderer_host/predictor_resource_throttle.cc:54: predictor_->LearnAboutInitialNavigation(request_scheme_host); On 2016/05/25 15:21:20, mmenke wrote: > On 2016/05/25 ...
4 years, 7 months ago (2016-05-25 15:24:41 UTC) #20
mmenke
LGTM https://codereview.chromium.org/1857383002/diff/140001/chrome/browser/net/predictor_browsertest.cc File chrome/browser/net/predictor_browsertest.cc (right): https://codereview.chromium.org/1857383002/diff/140001/chrome/browser/net/predictor_browsertest.cc#newcode844 chrome/browser/net/predictor_browsertest.cc:844: GURL redirecting_url = cross_site_test_server()->GetURL(base::StringPrintf( The URL doesn't redirect, ...
4 years, 7 months ago (2016-05-25 18:16:04 UTC) #21
Charlie Harrison
+sky for OWNERS, PTAL! https://codereview.chromium.org/1857383002/diff/140001/chrome/browser/net/predictor_browsertest.cc File chrome/browser/net/predictor_browsertest.cc (right): https://codereview.chromium.org/1857383002/diff/140001/chrome/browser/net/predictor_browsertest.cc#newcode844 chrome/browser/net/predictor_browsertest.cc:844: GURL redirecting_url = cross_site_test_server()->GetURL(base::StringPrintf( On ...
4 years, 7 months ago (2016-05-25 18:45:16 UTC) #23
mmenke
On 2016/05/25 18:45:16, csharrison wrote: > +sky for OWNERS, PTAL! Make sure you tell people ...
4 years, 7 months ago (2016-05-25 19:23:57 UTC) #24
Charlie Harrison
On 2016/05/25 19:23:57, mmenke wrote: > On 2016/05/25 18:45:16, csharrison wrote: > > +sky for ...
4 years, 7 months ago (2016-05-25 19:57:19 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1857383002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1857383002/160001
4 years, 6 months ago (2016-05-27 20:17:52 UTC) #27
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/12782) ios-device-gn on ...
4 years, 6 months ago (2016-05-27 20:20:15 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1857383002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1857383002/180001
4 years, 6 months ago (2016-05-27 21:30:01 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-27 22:06:26 UTC) #33
Charlie Harrison
sky@ friendly ping
4 years, 6 months ago (2016-05-31 18:10:52 UTC) #34
sky
LGTM
4 years, 6 months ago (2016-05-31 20:55:04 UTC) #35
Charlie Harrison
Thanks!
4 years, 6 months ago (2016-05-31 20:58:07 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1857383002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1857383002/180001
4 years, 6 months ago (2016-05-31 20:58:59 UTC) #39
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 6 months ago (2016-06-01 00:13:24 UTC) #40
commit-bot: I haz the power
4 years, 6 months ago (2016-06-01 00:14:46 UTC) #42
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cb0f401524eb0009f583f8bb63959115013bf1a4
Cr-Commit-Position: refs/heads/master@{#396988}

Powered by Google App Engine
This is Rietveld 408576698