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

Issue 2228003002: predictors: Fix duplicate content type detection. (Closed)

Created:
4 years, 4 months ago by Benoit L
Modified:
4 years, 4 months ago
Reviewers:
pasko, battre
CC:
chromium-reviews, shishir+watch_chromium.org, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

predictors: Fix duplicate content type detection. Content type mapping is done in two places: in ResourcePrefetchPredictor, and in ResourcePrefetchPredictorObserver. The first one is undesirable, since it overrides the resource type set at URL request time. Remove the duplication, and move the summary creation to ResourcePrefetchPredictor. This will make it easier to add tests as well. BUG=631966 Committed: https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f Cr-Commit-Position: refs/heads/master@{#412496}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments./ #

Patch Set 3 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -54 lines) Patch
M chrome/browser/net/resource_prefetch_predictor_observer.cc View 1 2 4 chunks +8 lines, -40 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_common.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_common.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.cc View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/predictors/resource_prefetcher_unittest.cc View 1 2 2 chunks +2 lines, -8 lines 0 comments Download

Messages

Total messages: 23 (12 generated)
Benoit L
4 years, 4 months ago (2016-08-09 16:08:29 UTC) #4
pasko
generally looks good, just a few stylistic comments https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h#newcode96 chrome/browser/predictors/resource_prefetch_predictor.h:96: static ...
4 years, 4 months ago (2016-08-09 17:08:54 UTC) #7
Benoit L
Thanks! https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h#newcode96 chrome/browser/predictors/resource_prefetch_predictor.h:96: static bool SummarizeResponse(const net::URLRequest* request, On 2016/08/09 17:08:54, ...
4 years, 4 months ago (2016-08-09 17:22:56 UTC) #8
pasko
https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h#newcode96 chrome/browser/predictors/resource_prefetch_predictor.h:96: static bool SummarizeResponse(const net::URLRequest* request, On 2016/08/09 17:22:56, Benoit ...
4 years, 4 months ago (2016-08-10 09:08:46 UTC) #9
Benoit L
Done, thanks! https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2228003002/diff/1/chrome/browser/predictors/resource_prefetch_predictor.h#newcode96 chrome/browser/predictors/resource_prefetch_predictor.h:96: static bool SummarizeResponse(const net::URLRequest* request, On 2016/08/10 ...
4 years, 4 months ago (2016-08-10 14:08:47 UTC) #10
pasko
lgtm
4 years, 4 months ago (2016-08-10 15:10:29 UTC) #11
Benoit L
Hi battre@, The CL moves code to browser/net/predictors (and fixes a bug at the same ...
4 years, 4 months ago (2016-08-10 15:20:37 UTC) #13
battre
On 2016/08/10 15:20:37, Benoit L wrote: > Hi battre@, > > The CL moves code ...
4 years, 4 months ago (2016-08-11 14:56:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2228003002/40001
4 years, 4 months ago (2016-08-17 11:14:56 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-17 11:18:47 UTC) #21
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 11:20:01 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f
Cr-Commit-Position: refs/heads/master@{#412496}

Powered by Google App Engine
This is Rietveld 408576698