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

Issue 10387200: Suppress pause-and-buffer behavior when the HTTP response won't satisfy future requests via cache. (Closed)

Created:
8 years, 7 months ago by Ami GONE FROM CHROMIUM
Modified:
8 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Suppress pause-and-buffer behavior when the HTTP response won't satisfy future requests via cache. BUG=123074 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=138972

Patch Set 1 #

Total comments: 17

Patch Set 2 : CR responses. #

Patch Set 3 : Alternative implementation requiring no further WebKit changes #

Total comments: 2

Patch Set 4 : Extracted GetReasonsForUncacheability and added tests. #

Total comments: 33

Patch Set 5 : rvargas CR #

Patch Set 6 : indent-to-first-paren #

Total comments: 2

Patch Set 7 : Bitfield for reasons and fix typo picking out the Date header. #

Total comments: 3

Patch Set 8 : vector? we don't need no stinkin' vector\! #

Patch Set 9 : Wow! Sometimes win_rel CQ failure actually means something other than flake! #

Patch Set 10 : %zu is win-unfriendly; use %PRIuS instead. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -30 lines) Patch
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_response_headers.cc View 1 2 3 4 5 6 1 chunk +10 lines, -26 lines 0 comments Download
M net/http/http_util.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M net/http/http_util.cc View 1 2 3 4 5 2 chunks +31 lines, -0 lines 0 comments Download
M webkit/media/buffered_data_source.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/media/buffered_resource_loader.h View 2 chunks +8 lines, -1 line 0 comments Download
M webkit/media/buffered_resource_loader.cc View 1 2 3 4 5 6 7 4 chunks +19 lines, -0 lines 0 comments Download
A webkit/media/cache_util.h View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A webkit/media/cache_util.cc View 1 2 3 4 5 6 7 8 1 chunk +87 lines, -0 lines 0 comments Download
A webkit/media/cache_util_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +97 lines, -0 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (0 generated)
Ami GONE FROM CHROMIUM
This patch relies on issue 10383201 and http://webk.it/86917 landing first. Ricardo/Andrew: this is a speculative ...
8 years, 7 months ago (2012-05-18 23:02:35 UTC) #1
rvargas (doing something else)
looks reasonable to me. https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc#newcode371 webkit/media/buffered_resource_loader.cc:371: kMaxReason = kNoCache + 1 ...
8 years, 7 months ago (2012-05-19 01:19:40 UTC) #2
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc#newcode364 webkit/media/buffered_resource_loader.cc:364: kPre11PartialResponse = 2, // 206 but HTTP version < ...
8 years, 7 months ago (2012-05-19 02:26:24 UTC) #3
Ami GONE FROM CHROMIUM
Thanks for the quick reviews! https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/1/webkit/media/buffered_resource_loader.cc#newcode364 webkit/media/buffered_resource_loader.cc:364: kPre11PartialResponse = 2, // ...
8 years, 7 months ago (2012-05-19 03:03:02 UTC) #4
scherkus (not reviewing)
lgtm -- it's true http/https will drown out responses but I feel there is some ...
8 years, 7 months ago (2012-05-21 21:35:49 UTC) #5
Ami GONE FROM CHROMIUM
Darin: PS#3 has the result of our IM from earlier today. WDYT? scherkus/rvargas: darin@ suggested ...
8 years, 7 months ago (2012-05-22 05:12:17 UTC) #6
Ami GONE FROM CHROMIUM
> > can you file bugs for the local source / > not-pause-and-buffer-if-the-**source-doesnt-involve-the-**network? > Filed ...
8 years, 7 months ago (2012-05-22 05:15:41 UTC) #7
darin (slow to review)
https://chromiumcodereview.appspot.com/10387200/diff/9002/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/9002/webkit/media/buffered_resource_loader.cc#newcode381 webkit/media/buffered_resource_loader.cc:381: static bool MightBeReusedFromCacheInFuture(const WebURLResponse& response) { style nit: usually ...
8 years, 7 months ago (2012-05-22 05:30:59 UTC) #8
Ami GONE FROM CHROMIUM
> https://chromiumcodereview.appspot.com/10387200/diff/9002/webkit/media/buffered_resource_loader.cc > File webkit/media/buffered_resource_loader.cc (right): > > https://chromiumcodereview.appspot.com/10387200/diff/9002/webkit/media/buffered_resource_loader.cc#newcode381 > webkit/media/buffered_resource_loader.cc:381: static bool > MightBeReusedFromCacheInFuture(const ...
8 years, 7 months ago (2012-05-22 08:30:21 UTC) #9
Ami GONE FROM CHROMIUM
BTW an alternative I considered was giving HttpResponseHeaders an additional constructor that would take a ...
8 years, 7 months ago (2012-05-22 16:09:45 UTC) #10
rvargas (doing something else)
A better approach seems to be to go the other way around: leave the actual ...
8 years, 7 months ago (2012-05-22 16:43:12 UTC) #11
Ami GONE FROM CHROMIUM
On Tue, May 22, 2012 at 9:43 AM, <rvargas@chromium.org> wrote: > A better approach seems ...
8 years, 7 months ago (2012-05-22 16:55:34 UTC) #12
Ami GONE FROM CHROMIUM
> > build an HRH is to concatenate the headers from WebURLResponse following a > ...
8 years, 7 months ago (2012-05-22 17:51:53 UTC) #13
darin (slow to review)
On Tue, May 22, 2012 at 1:30 AM, Ami Fischman <fischman@chromium.org> wrote: > > > ...
8 years, 7 months ago (2012-05-22 18:07:50 UTC) #14
darin (slow to review)
WebURLResponse keeps a hash map of header / value pairs. That is a lossy representation ...
8 years, 7 months ago (2012-05-22 18:09:26 UTC) #15
rvargas (doing something else)
Just so that it's clear, I'm not suggesting exposing the reconstructed HttpResponseHeaders to anyone, nor ...
8 years, 7 months ago (2012-05-22 20:15:29 UTC) #16
darin (slow to review)
Are you suggesting making the method be static on HttpResponseHeaders so it can be called ...
8 years, 7 months ago (2012-05-22 21:31:14 UTC) #17
rvargas (doing something else)
On 2012/05/22 21:31:14, darin wrote: > Are you suggesting making the method be static on ...
8 years, 7 months ago (2012-05-22 21:58:47 UTC) #18
darin (slow to review)
On Tue, May 22, 2012 at 2:58 PM, <rvargas@chromium.org> wrote: > On 2012/05/22 21:31:14, darin ...
8 years, 7 months ago (2012-05-22 22:09:08 UTC) #19
darin (slow to review)
On Tue, May 22, 2012 at 3:09 PM, Darin Fisher <darin@chromium.org> wrote: > > > ...
8 years, 7 months ago (2012-05-22 22:09:45 UTC) #20
Ami GONE FROM CHROMIUM
Alrighty, extracted the method and added tests in PS#4. Can I get an amen?
8 years, 7 months ago (2012-05-23 00:00:19 UTC) #21
scherkus (not reviewing)
http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1166 net/http/http_response_headers.cc:1166: EnumerateHeader(NULL, "Last-Modified", &last_modified_header); FYI I notice a lot of ...
8 years, 7 months ago (2012-05-23 01:16:03 UTC) #22
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1166 net/http/http_response_headers.cc:1166: EnumerateHeader(NULL, "Last-Modified", &last_modified_header); On 2012/05/23 01:16:03, scherkus wrote: > ...
8 years, 7 months ago (2012-05-23 01:27:28 UTC) #23
scherkus (not reviewing)
lgtm for my bits darin/rvargas? http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1166 net/http/http_response_headers.cc:1166: EnumerateHeader(NULL, "Last-Modified", &last_modified_header); On ...
8 years, 7 months ago (2012-05-23 01:34:19 UTC) #24
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/10387200/diff/11002/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): http://codereview.chromium.org/10387200/diff/11002/webkit/media/buffered_resource_loader.cc#newcode380 webkit/media/buffered_resource_loader.cc:380: "Media.UncacheableReason", reasons[i], kMaxReason); On 2012/05/23 01:34:19, scherkus wrote: > ...
8 years, 7 months ago (2012-05-23 01:38:25 UTC) #25
scherkus (not reviewing)
http://codereview.chromium.org/10387200/diff/11002/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): http://codereview.chromium.org/10387200/diff/11002/webkit/media/buffered_resource_loader.cc#newcode380 webkit/media/buffered_resource_loader.cc:380: "Media.UncacheableReason", reasons[i], kMaxReason); On 2012/05/23 01:38:25, Ami Fischman wrote: ...
8 years, 7 months ago (2012-05-23 01:43:01 UTC) #26
rvargas (doing something else)
lgtm http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1170 net/http/http_response_headers.cc:1170: GetHttpVersion(), etag_header, last_modified_header, date_header); nit: this call should ...
8 years, 7 months ago (2012-05-23 02:04:12 UTC) #27
Ami GONE FROM CHROMIUM
Darin: what say? http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1170 net/http/http_response_headers.cc:1170: GetHttpVersion(), etag_header, last_modified_header, date_header); On 2012/05/23 ...
8 years, 7 months ago (2012-05-23 03:55:23 UTC) #28
rvargas (doing something else)
http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_response_headers.cc#newcode1170 net/http/http_response_headers.cc:1170: GetHttpVersion(), etag_header, last_modified_header, date_header); On 2012/05/23 03:55:23, Ami Fischman ...
8 years, 7 months ago (2012-05-23 18:26:08 UTC) #29
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/10387200/diff/11002/net/http/http_util.cc File net/http/http_util.cc (right): http://codereview.chromium.org/10387200/diff/11002/net/http/http_util.cc#newcode704 net/http/http_util.cc:704: HttpVersion version, On 2012/05/23 18:26:09, rvargas wrote: > (warning, ...
8 years, 7 months ago (2012-05-23 19:29:51 UTC) #30
darin (slow to review)
OK, LGTM... one suggestion: http://codereview.chromium.org/10387200/diff/7003/webkit/media/cache_util_unittest.cc File webkit/media/cache_util_unittest.cc (right): http://codereview.chromium.org/10387200/diff/7003/webkit/media/cache_util_unittest.cc#newcode83 webkit/media/cache_util_unittest.cc:83: std::vector<UncacheableReason> reasons = just an ...
8 years, 7 months ago (2012-05-23 20:35:01 UTC) #31
Ami GONE FROM CHROMIUM
Thanks for the reviews, all! http://codereview.chromium.org/10387200/diff/7003/webkit/media/cache_util_unittest.cc File webkit/media/cache_util_unittest.cc (right): http://codereview.chromium.org/10387200/diff/7003/webkit/media/cache_util_unittest.cc#newcode83 webkit/media/cache_util_unittest.cc:83: std::vector<UncacheableReason> reasons = On ...
8 years, 7 months ago (2012-05-23 21:36:50 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/7003
8 years, 7 months ago (2012-05-23 21:39:59 UTC) #33
darin (slow to review)
On Wed, May 23, 2012 at 2:36 PM, <fischman@chromium.org> wrote: > Thanks for the reviews, ...
8 years, 7 months ago (2012-05-23 22:08:34 UTC) #34
commit-bot: I haz the power
Try job failure for 10387200-7003 (retry) on linux_rel for step "net_unittests". It's a second try, ...
8 years, 7 months ago (2012-05-23 22:24:05 UTC) #35
Ami GONE FROM CHROMIUM
> > You could implement exactly the same UMA histograms. > D'oh! I mapped your ...
8 years, 7 months ago (2012-05-23 22:51:53 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/29001
8 years, 7 months ago (2012-05-23 22:54:18 UTC) #37
darin (slow to review)
https://chromiumcodereview.appspot.com/10387200/diff/29001/webkit/media/cache_util.cc File webkit/media/cache_util.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/29001/webkit/media/cache_util.cc#newcode27 webkit/media/cache_util.cc:27: std::vector<UncacheableReason> GetReasonsForUncacheability( the next logical step is to return ...
8 years, 7 months ago (2012-05-23 23:38:43 UTC) #38
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/10387200/diff/29001/webkit/media/cache_util.cc File webkit/media/cache_util.cc (right): https://chromiumcodereview.appspot.com/10387200/diff/29001/webkit/media/cache_util.cc#newcode27 webkit/media/cache_util.cc:27: std::vector<UncacheableReason> GetReasonsForUncacheability( On 2012/05/23 23:38:43, darin wrote: > the ...
8 years, 7 months ago (2012-05-23 23:44:06 UTC) #39
darin (slow to review)
On Wed, May 23, 2012 at 4:44 PM, <fischman@chromium.org> wrote: > > https://chromiumcodereview.**appspot.com/10387200/diff/** > 29001/webkit/media/cache_util.**cc<https://chromiumcodereview.appspot.com/10387200/diff/29001/webkit/media/cache_util.cc> ...
8 years, 7 months ago (2012-05-23 23:56:13 UTC) #40
commit-bot: I haz the power
Try job failure for 10387200-29001 (retry) on win_rel for step "content_unittests". It's a second try, ...
8 years, 7 months ago (2012-05-24 03:56:20 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/38001
8 years, 7 months ago (2012-05-24 04:35:20 UTC) #42
Ami GONE FROM CHROMIUM
On 2012/05/23 23:56:13, darin wrote: > Hmm... I guess enumerating over the bits is not ...
8 years, 7 months ago (2012-05-24 04:35:52 UTC) #43
darin (slow to review)
LGTM
8 years, 7 months ago (2012-05-24 07:25:31 UTC) #44
commit-bot: I haz the power
Try job failure for 10387200-38001 (retry) on win_rel for steps "browser_tests, content_unittests" (clobber build). It's ...
8 years, 7 months ago (2012-05-24 10:31:10 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/38001
8 years, 7 months ago (2012-05-24 14:55:22 UTC) #46
commit-bot: I haz the power
Try job failure for 10387200-38001 (retry) on win_rel for steps "browser_tests, content_unittests". It's a second ...
8 years, 7 months ago (2012-05-24 18:44:43 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/45002
8 years, 7 months ago (2012-05-24 19:44:28 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/10387200/40009
8 years, 7 months ago (2012-05-24 22:43:44 UTC) #49
commit-bot: I haz the power
8 years, 7 months ago (2012-05-25 02:15:40 UTC) #50
Change committed as 138972

Powered by Google App Engine
This is Rietveld 408576698