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 332913003: Add a 'Service-Worker: script' header to SW script downloads (Closed)

Created:
6 years, 5 months ago by jkarlin
Modified:
6 years, 5 months ago
Reviewers:
michaeln, gavinp
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add and test the 'Service-Worker: script' header to script downloads. Also fix a bug in which the cache job wasn't being used in tests because the state was set to "INSTALL" before starting the SW. BUG=389124, 389561 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280553

Patch Set 1 #

Patch Set 2 : Nits #

Total comments: 2

Patch Set 3 : Setting the Service-Worker header in browser instead of blink #

Patch Set 4 : Rebase #

Patch Set 5 : Fix a test #

Patch Set 6 : Unfix test #

Total comments: 7

Patch Set 7 : Formatting and moving SetExtraRequestHeaders call #

Patch Set 8 : Putting SetExtraRequestHeaders call back #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -4 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 chunks +25 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_request_handler.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 3 chunks +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.h View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 2 7 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
jkarlin
michaeln: Thanks!
6 years, 5 months ago (2014-06-26 18:04:30 UTC) #1
jkarlin
Whoops, forgot to actually add you. michaeln: Please review all, thanks!
6 years, 5 months ago (2014-06-26 18:13:00 UTC) #2
gavinp
https://codereview.chromium.org/332913003/diff/20001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/332913003/diff/20001/content/browser/service_worker/service_worker_browsertest.cc#newcode164 content/browser/service_worker/service_worker_browsertest.cc:164: request.headers.find("Service-Worker"); Don't we normally write ServiceWorker as one word?
6 years, 5 months ago (2014-06-26 18:15:24 UTC) #3
gavinp
https://codereview.chromium.org/332913003/diff/20001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/332913003/diff/20001/content/browser/service_worker/service_worker_browsertest.cc#newcode164 content/browser/service_worker/service_worker_browsertest.cc:164: request.headers.find("Service-Worker"); On 2014/06/26 18:15:24, gavinp wrote: > Don't we ...
6 years, 5 months ago (2014-06-26 18:16:59 UTC) #4
michaeln
lgtm To ensure we never pick the resource up from the browser cache, in addition ...
6 years, 5 months ago (2014-06-26 19:57:56 UTC) #5
jkarlin
On 2014/06/26 19:57:56, michaeln wrote: > lgtm > > To ensure we never pick the ...
6 years, 5 months ago (2014-06-26 23:48:03 UTC) #6
michaeln1
> Good point, we should set that flag too. I'll make a separate CL for ...
6 years, 5 months ago (2014-06-27 00:13:59 UTC) #7
dominicc (has gone to gerrit)
On 2014/06/27 00:13:59, michaeln1 wrote: > > Good point, we should set that flag too. ...
6 years, 5 months ago (2014-06-27 07:12:09 UTC) #8
jkarlin
PTAL michaeln. I've moved the header logic into browser instead of Blink. Fixed a bug ...
6 years, 5 months ago (2014-06-27 15:05:35 UTC) #9
michaeln
this lgtm (even better from my pov) https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (left): https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_version.cc#oldcode242 content/browser/service_worker/service_worker_version.cc:242: SetStatus(INSTALLING); what ...
6 years, 5 months ago (2014-06-27 19:50:41 UTC) #10
michaeln
On 2014/06/27 07:12:09, dominicc wrote: > On 2014/06/27 00:13:59, michaeln1 wrote: > > > Good ...
6 years, 5 months ago (2014-06-27 20:05:59 UTC) #11
michaeln
> Also fix a bug in which the cache job wasn't being used in tests ...
6 years, 5 months ago (2014-06-27 20:14:04 UTC) #12
jkarlin
https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (left): https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_version.cc#oldcode242 content/browser/service_worker/service_worker_version.cc:242: SetStatus(INSTALLING); On 2014/06/27 19:50:41, michaeln wrote: > what went ...
6 years, 5 months ago (2014-06-28 00:26:13 UTC) #13
jkarlin
On 2014/06/27 20:14:04, michaeln wrote: > > Also fix a bug in which the cache ...
6 years, 5 months ago (2014-06-28 00:29:26 UTC) #14
jkarlin
https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc (right): https://codereview.chromium.org/332913003/diff/90001/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode110 content/browser/service_worker/service_worker_write_to_cache_job.cc:110: net_request_->SetExtraRequestHeaders(headers); On 2014/06/28 00:26:12, jkarlin wrote: > On 2014/06/27 ...
6 years, 5 months ago (2014-06-29 14:09:37 UTC) #15
jkarlin
The CQ bit was checked by jkarlin@chromium.org
6 years, 5 months ago (2014-06-29 19:28:15 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/332913003/130001
6 years, 5 months ago (2014-06-29 19:28:54 UTC) #17
commit-bot: I haz the power
6 years, 5 months ago (2014-06-29 20:37:19 UTC) #18
Message was sent while issue was closed.
Change committed as 280553

Powered by Google App Engine
This is Rietveld 408576698