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

Issue 391763002: Initial implementation of Chrome-Freshness header. (Closed)

Created:
6 years, 5 months ago by Adam Rice
Modified:
6 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Initial implementation of Chrome-Freshness header. Add a header like Chrome-Freshness: max-age=30,stale-while-revalidate=60,age=10 when sending a revalidation request to a server which supplied the Cache-Control stale-while-revalidate directive on the previous response. Design doc: https://docs.google.com/document/d/1DMCIMAKjyKeYiu69jlI5OsO2pGyAMb81XflYK4hxsNM/edit BUG=348877 TEST=net_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286482

Patch Set 1 #

Patch Set 2 : Add test that Chrome-Freshness header is added. #

Patch Set 3 : Use PrivacyMode setting to control sending Chrome-Freshness header. #

Total comments: 6

Patch Set 4 : Make stale-while-revalidate value parsing stricter #

Total comments: 6

Patch Set 5 : Comment and test name fixes. #

Total comments: 9

Patch Set 6 : Rename header and move GetStaleWhileRevalidateValue #

Total comments: 13

Patch Set 7 : Rebase. #

Patch Set 8 : Add tests for GetMaxAgeValue and GetStaleWhileRevalidateValue. #

Total comments: 2

Patch Set 9 : Remove const from directive_size. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -23 lines) Patch
M net/http/http_cache_transaction.cc View 1 2 3 4 5 3 chunks +28 lines, -0 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 3 4 5 6 7 1 chunk +70 lines, -0 lines 0 comments Download
M net/http/http_response_headers.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M net/http/http_response_headers.cc View 1 2 3 4 5 6 7 8 3 chunks +32 lines, -23 lines 0 comments Download
M net/http/http_response_headers_unittest.cc View 1 2 3 4 5 6 7 3 chunks +150 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Adam Rice
6 years, 5 months ago (2014-07-17 15:12:33 UTC) #1
tyoshino (SeeGerritForStatus)
please wrap the CL description to 80 col https://codereview.chromium.org/391763002/diff/40001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/391763002/diff/40001/net/http/http_cache_transaction.cc#newcode260 net/http/http_cache_transaction.cc:260: base::StringToInt64( ...
6 years, 5 months ago (2014-07-18 02:29:55 UTC) #2
Adam Rice
https://codereview.chromium.org/391763002/diff/40001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/391763002/diff/40001/net/http/http_cache_transaction.cc#newcode260 net/http/http_cache_transaction.cc:260: base::StringToInt64( On 2014/07/18 02:29:55, tyoshino wrote: > handle failure? ...
6 years, 5 months ago (2014-07-18 04:16:51 UTC) #3
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc#newcode6480 net/http/http_cache_unittest.cc:6480: // write to the cache Use a capital ...
6 years, 5 months ago (2014-07-22 06:29:34 UTC) #4
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc#newcode6453 net/http/http_cache_unittest.cc:6453: EXPECT_EQ("max-age=3600,stale-while-revalidate=7200,age=228658821", value); could you please write a comment explaining ...
6 years, 5 months ago (2014-07-22 06:31:55 UTC) #5
Adam Rice
https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/60001/net/http/http_cache_unittest.cc#newcode6453 net/http/http_cache_unittest.cc:6453: EXPECT_EQ("max-age=3600,stale-while-revalidate=7200,age=228658821", value); On 2014/07/22 06:31:55, tyoshino wrote: > could ...
6 years, 5 months ago (2014-07-22 07:27:42 UTC) #6
Adam Rice
+rvargas for net OWNERS.
6 years, 5 months ago (2014-07-22 15:22:09 UTC) #7
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_unittest.cc#newcode6455 net/http/http_cache_unittest.cc:6455: // same. Hmm... FYI, 18 Apr 2007 01:10:43 + ...
6 years, 5 months ago (2014-07-23 00:08:56 UTC) #8
rvargas (doing something else)
https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc#newcode55 net/http/http_cache_transaction.cc:55: static const char kFreshnessHeader[] = "Chrome-Freshness"; Shouldn't we use ...
6 years, 5 months ago (2014-07-24 00:54:06 UTC) #9
kenjibaheux
> https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc#newcode55 > net/http/http_cache_transaction.cc:55: static const char kFreshnessHeader[] = > "Chrome-Freshness"; > Shouldn't we use ...
6 years, 5 months ago (2014-07-24 05:11:57 UTC) #10
kenjibaheux
As an FYI, I just published a draft/tentative specification for the header at https://github.com/KenjiBaheux/resource-freshness Comments ...
6 years, 5 months ago (2014-07-24 08:39:57 UTC) #11
rvargas (doing something else)
On 2014/07/24 05:11:57, kenjibaheux wrote: > > > https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc#newcode55 > > net/http/http_cache_transaction.cc:55: static const char ...
6 years, 5 months ago (2014-07-24 18:11:11 UTC) #12
kenjibaheux
On 2014/07/24 18:11:11, rvargas wrote: > On 2014/07/24 05:11:57, kenjibaheux wrote: > > > > ...
6 years, 5 months ago (2014-07-24 23:44:44 UTC) #13
Adam Rice
Unfortunately, from http://www.chromium.org/developers/coding-style#Naming : - "Chromium" is the name of the project, not the product, ...
6 years, 5 months ago (2014-07-25 05:37:55 UTC) #14
Adam Rice
https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/391763002/diff/80001/net/http/http_cache_transaction.cc#newcode55 net/http/http_cache_transaction.cc:55: static const char kFreshnessHeader[] = "Chrome-Freshness"; On 2014/07/24 00:54:06, ...
6 years, 4 months ago (2014-07-28 11:11:13 UTC) #15
rvargas (doing something else)
https://codereview.chromium.org/391763002/diff/100001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/100001/net/http/http_cache_unittest.cc#newcode6463 net/http/http_cache_unittest.cc:6463: const MockTransaction kStaleWhileRevalidateTransaction = { It may be more ...
6 years, 4 months ago (2014-07-28 19:24:01 UTC) #16
Adam Rice
https://codereview.chromium.org/391763002/diff/100001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/391763002/diff/100001/net/http/http_cache_unittest.cc#newcode6463 net/http/http_cache_unittest.cc:6463: const MockTransaction kStaleWhileRevalidateTransaction = { On 2014/07/28 19:24:00, rvargas ...
6 years, 4 months ago (2014-07-29 17:04:45 UTC) #17
rvargas (doing something else)
LGTM https://codereview.chromium.org/391763002/diff/100001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/391763002/diff/100001/net/http/http_response_headers.cc#newcode1121 net/http/http_response_headers.cc:1121: bool HttpResponseHeaders::GetStaleWhileRevalidateValue( On 2014/07/29 17:04:45, Adam Rice wrote: ...
6 years, 4 months ago (2014-07-29 19:21:22 UTC) #18
Adam Rice
https://codereview.chromium.org/391763002/diff/100001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/391763002/diff/100001/net/http/http_response_headers.cc#newcode1131 net/http/http_response_headers.cc:1131: const size_t directive_size = directive.size(); On 2014/07/29 19:21:22, rvargas ...
6 years, 4 months ago (2014-07-30 02:00:59 UTC) #19
Adam Rice
The CQ bit was checked by ricea@chromium.org
6 years, 4 months ago (2014-07-30 02:05:38 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/391763002/160001
6 years, 4 months ago (2014-07-30 02:08:06 UTC) #21
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 11:33:59 UTC) #22
Message was sent while issue was closed.
Change committed as 286482

Powered by Google App Engine
This is Rietveld 408576698