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

Issue 15963003: Generate an etag for chrome-extension:// file requests, so caching can be optional (Closed)

Created:
7 years, 7 months ago by jvoung (off chromium)
Modified:
7 years, 6 months ago
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Generate an etag for chrome-extension:// file requests. This allows code downstream to use those headers as caching signals, and optionally cache extension files, or files derived from extension files. Whenever an etag is sent, send "cache-control: no-cache" so that downstream users know it's a good idea to revalidate. One downstream is PNaCl, which would like to use standard cache-related http response headers to determine how to cache translations of bitcode. Currently, only bitcode downloaded from web servers have such headers, and this CL adds headers for bitcode "downloaded" from chrome extensions. See chromium-dev discussion: "Add to HttpResponse headers for chrome/browser/extensions/extension_protocols" BUG=https://code.google.com/p/nativeclient/issues/detail?id=2992 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203830

Patch Set 1 #

Patch Set 2 : on the different threads #

Patch Set 3 : cleanup #

Patch Set 4 : rename #

Total comments: 4

Patch Set 5 : cleanup #

Total comments: 5

Patch Set 6 : ToInternalValue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -15 lines) Patch
M chrome/browser/extensions/extension_protocols.cc View 1 2 3 4 5 10 chunks +62 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_protocols_unittest.cc View 1 2 3 4 3 chunks +56 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/response_headers/manifest.json View 1 2 1 chunk +1 line, -3 lines 0 comments Download
A chrome/test/data/extensions/response_headers/test.dat View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jvoung (off chromium)
So did this seem okay? If so, Matt would you be able to review?
7 years, 6 months ago (2013-06-03 17:26:23 UTC) #1
Matt Perry
LGTM, though I didn't closely follow the discussion on chromium-dev. https://codereview.chromium.org/15963003/diff/20001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://codereview.chromium.org/15963003/diff/20001/chrome/browser/extensions/extension_protocols.cc#newcode82 ...
7 years, 6 months ago (2013-06-03 18:13:55 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/15963003/diff/20001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://codereview.chromium.org/15963003/diff/20001/chrome/browser/extensions/extension_protocols.cc#newcode82 chrome/browser/extensions/extension_protocols.cc:82: raw_headers.append(etag.c_str()); On 2013/06/03 18:13:55, Matt Perry wrote: > No ...
7 years, 6 months ago (2013-06-03 20:21:52 UTC) #3
rvargas (doing something else)
lgtm https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols.cc#newcode76 chrome/browser/extensions/extension_protocols.cc:76: std::string hash = base::StringPrintf("%f", last_modified_time.ToDoubleT()); nit: ToInternalValue ? ...
7 years, 6 months ago (2013-06-03 21:12:37 UTC) #4
jvoung (off chromium)
https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols.cc File chrome/browser/extensions/extension_protocols.cc (right): https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols.cc#newcode76 chrome/browser/extensions/extension_protocols.cc:76: std::string hash = base::StringPrintf("%f", last_modified_time.ToDoubleT()); On 2013/06/03 21:12:37, rvargas ...
7 years, 6 months ago (2013-06-03 22:08:22 UTC) #5
Matt Perry
https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols_unittest.cc File chrome/browser/extensions/extension_protocols_unittest.cc (right): https://chromiumcodereview.appspot.com/15963003/diff/26001/chrome/browser/extensions/extension_protocols_unittest.cc#newcode82 chrome/browser/extensions/extension_protocols_unittest.cc:82: Extension::Create(path, Manifest::UNPACKED, manifest, On 2013/06/03 22:08:22, jvoung (cr) wrote: ...
7 years, 6 months ago (2013-06-03 22:17:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jvoung@chromium.org/15963003/30002
7 years, 6 months ago (2013-06-03 22:33:28 UTC) #7
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) base_unittests, browser_tests, cacheinvalidation_unittests, cc_unittests, check_deps, chromedriver2_unittests, ...
7 years, 6 months ago (2013-06-03 22:50:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jvoung@chromium.org/15963003/30002
7 years, 6 months ago (2013-06-03 23:58:06 UTC) #9
commit-bot: I haz the power
7 years, 6 months ago (2013-06-04 03:49:35 UTC) #10
Message was sent while issue was closed.
Change committed as 203830

Powered by Google App Engine
This is Rietveld 408576698