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

Issue 2251633002: Use tri-state enum for the existence of Fetch Handler in ServiceWorkerVersion. (Closed)

Created:
4 years, 4 months ago by horo
Modified:
4 years, 4 months ago
Reviewers:
shimazu
CC:
blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use tri-state enum for the existence of Fetch Handler in ServiceWorkerVersion. To make sure that the status of fetch handler is set only when the install event has been executed in a new version or when an installed version is loaded from the storage. https://codereview.chromium.org/2250623003/ depends on this CL. BUG=561209 Committed: https://crrev.com/e545dcd96514138d5bef849b4a1a44030fa539d8 Cr-Commit-Position: refs/heads/master@{#413136}

Patch Set 1 #

Total comments: 2

Patch Set 2 : use enum #

Patch Set 3 : remove unused has_fetch_handler_ in service_worker_version.h #

Total comments: 2

Patch Set 4 : s/status/existence/ #

Patch Set 5 : s/status/existence/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -51 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 9 chunks +21 lines, -23 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 2 3 3 chunks +15 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 3 5 chunks +10 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host_unittest.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_handle_unittest.cc View 1 2 3 2 chunks +7 lines, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_registration_unittest.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 9 chunks +18 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 3 chunks +19 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (47 generated)
horo
shimazu@ Could you please review?
4 years, 4 months ago (2016-08-17 06:40:39 UTC) #16
shimazu
https://codereview.chromium.org/2251633002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2251633002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode909 content/browser/service_worker/service_worker_browsertest.cc:909: InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); How about adding EXPECT_EQ(base::nullopt, version_->has_fetch_handler()) before installing?
4 years, 4 months ago (2016-08-18 04:47:03 UTC) #19
Marijn Kruisselbrink
Just a drive-by comment, but is an base::Optional<bool> really the best thing to use here? ...
4 years, 4 months ago (2016-08-18 05:01:36 UTC) #20
horo
On 2016/08/18 05:01:36, Marijn Kruisselbrink wrote: > Just a drive-by comment, but is an base::Optional<bool> ...
4 years, 4 months ago (2016-08-18 08:03:17 UTC) #23
horo
https://codereview.chromium.org/2251633002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2251633002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode909 content/browser/service_worker/service_worker_browsertest.cc:909: InstallTestHelper("/service_worker/fetch_event.js", SERVICE_WORKER_OK); On 2016/08/18 04:47:03, shimazu wrote: > How ...
4 years, 4 months ago (2016-08-18 08:03:27 UTC) #24
shimazu
I also feel enum is clearer, too. Thanks:) https://codereview.chromium.org/2251633002/diff/80001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/2251633002/diff/80001/content/browser/service_worker/service_worker_version.h#newcode148 content/browser/service_worker/service_worker_version.h:148: FetchHandlerStatus ...
4 years, 4 months ago (2016-08-19 02:14:36 UTC) #37
horo
https://codereview.chromium.org/2251633002/diff/80001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/2251633002/diff/80001/content/browser/service_worker/service_worker_version.h#newcode148 content/browser/service_worker/service_worker_version.h:148: FetchHandlerStatus fetch_handler_status() const { On 2016/08/19 02:14:36, shimazu wrote: ...
4 years, 4 months ago (2016-08-19 08:48:05 UTC) #49
shimazu
lgtm
4 years, 4 months ago (2016-08-19 08:54:30 UTC) #50
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/2251633002/140001
4 years, 4 months ago (2016-08-19 14:20:23 UTC) #54
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 4 months ago (2016-08-19 14:25:50 UTC) #56
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 14:27:52 UTC) #58
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e545dcd96514138d5bef849b4a1a44030fa539d8
Cr-Commit-Position: refs/heads/master@{#413136}

Powered by Google App Engine
This is Rietveld 408576698