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

Issue 633873002: Service Worker: Respect the "clear on exit" content setting (Closed)

Created:
6 years, 2 months ago by falken
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@contentsettings
Project:
chromium
Visibility:
Public.

Description

Service Worker: Respect the "clear on exit" content setting Now Service Worker registrations and data get deleted as per SpecialStoragePolicy. BUG=419280 Committed: https://crrev.com/7253028818568d4233acc2031fe0a82f6d8d99b9 Cr-Commit-Position: refs/heads/master@{#299842}

Patch Set 1 #

Patch Set 2 : just clear in dtor #

Total comments: 8

Patch Set 3 : review comments #

Patch Set 4 : rebase to master #

Total comments: 2

Patch Set 5 : michaeln comments #

Total comments: 2

Patch Set 6 : block shutdown #

Patch Set 7 : self review #

Total comments: 5

Patch Set 8 : review comments #

Patch Set 9 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -85 lines) Patch
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 4 5 3 chunks +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 2 3 4 5 4 chunks +7 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 2 3 4 5 4 chunks +20 lines, -17 lines 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 2 chunks +18 lines, -17 lines 0 comments Download
A content/browser/service_worker/service_worker_database_task_manager.h View 1 2 3 4 5 6 7 1 chunk +75 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_database_task_manager.cc View 1 2 3 4 5 6 7 1 chunk +71 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_registration_unittest.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 2 3 4 5 6 7 8 8 chunks +18 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 4 5 6 7 8 22 chunks +64 lines, -26 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 4 5 2 chunks +10 lines, -2 lines 0 comments Download
M content/browser/storage_partition_impl.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (7 generated)
falken
PTAL (unittest is in progress)
6 years, 2 months ago (2014-10-07 09:24:14 UTC) #2
michaeln
lgtm modulo auto nits https://codereview.chromium.org/633873002/diff/20001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/633873002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode701 content/browser/service_worker/service_worker_database.cc:701: for (auto origin : origins) ...
6 years, 2 months ago (2014-10-08 01:22:27 UTC) #3
michaeln
oh, i'll take a look at the tests too if you like
6 years, 2 months ago (2014-10-08 01:23:48 UTC) #4
falken
Thanks! Remediated to your review and added a test. https://codereview.chromium.org/633873002/diff/20001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/633873002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode701 content/browser/service_worker/service_worker_database.cc:701: ...
6 years, 2 months ago (2014-10-08 02:36:44 UTC) #5
falken
+jochen can you please review: content/browser/storage_partition_impl.cc
6 years, 2 months ago (2014-10-08 03:51:29 UTC) #7
jochen (gone - plz use gerrit)
basically the same as the cookie content settings CL
6 years, 2 months ago (2014-10-08 14:56:43 UTC) #9
michaeln1
test lgtm 2 https://codereview.chromium.org/633873002/diff/60001/content/browser/service_worker/service_worker_storage_unittest.cc File content/browser/service_worker/service_worker_storage_unittest.cc (right): https://codereview.chromium.org/633873002/diff/60001/content/browser/service_worker/service_worker_storage_unittest.cc#newcode869 content/browser/service_worker/service_worker_storage_unittest.cc:869: cleared_registration->waiting_version()->SetStatus(ServiceWorkerVersion::NEW); to more closely mimic actual ...
6 years, 2 months ago (2014-10-08 19:28:57 UTC) #11
jochen (gone - plz use gerrit)
can somebody help me understand how we ensure that all origins are deleted before shutdown ...
6 years, 2 months ago (2014-10-09 11:42:05 UTC) #12
falken
On 2014/10/09 11:42:05, jochen wrote: > can somebody help me understand how we ensure that ...
6 years, 2 months ago (2014-10-09 13:34:26 UTC) #13
jochen (gone - plz use gerrit)
yeah, I think so. Michael should know, he wrote that stuff IIRC :)
6 years, 2 months ago (2014-10-09 13:44:37 UTC) #14
michaeln
> Does the task runner need to be BLOCK_SHUTDOWN? Good question. Not all the tasks, ...
6 years, 2 months ago (2014-10-09 19:56:24 UTC) #15
michaeln
> Michael should know, he wrote that stuff IIRC :) I helped add some features ...
6 years, 2 months ago (2014-10-09 19:58:37 UTC) #16
dominicc (has gone to gerrit)
I wonder if that will be sufficient to fix crbug.com/419290 as well, then.
6 years, 2 months ago (2014-10-10 01:46:59 UTC) #17
falken
On 2014/10/09 19:56:24, michaeln wrote: > > Does the task runner need to be BLOCK_SHUTDOWN? ...
6 years, 2 months ago (2014-10-10 09:33:44 UTC) #18
jochen (gone - plz use gerrit)
other systems do (2), so I'd go with that
6 years, 2 months ago (2014-10-10 11:14:59 UTC) #19
michaeln1
> I wonder if that will be sufficient to fix crbug.com/419290 as well, then. No, ...
6 years, 2 months ago (2014-10-10 19:32:57 UTC) #20
michaeln1
> > > Does the task runner need to be BLOCK_SHUTDOWN? > > > > ...
6 years, 2 months ago (2014-10-10 19:45:21 UTC) #21
falken
Thanks for the advice. Now it blocks on shutdown. PTAL. https://codereview.chromium.org/633873002/diff/80001/content/browser/service_worker/service_worker_database_unittest.cc File content/browser/service_worker/service_worker_database_unittest.cc (right): https://codereview.chromium.org/633873002/diff/80001/content/browser/service_worker/service_worker_database_unittest.cc#newcode998 ...
6 years, 2 months ago (2014-10-14 09:14:29 UTC) #22
jochen (gone - plz use gerrit)
i defer to Michael for service_worker/* rest lgtm
6 years, 2 months ago (2014-10-14 13:56:56 UTC) #23
michaeln
lgtm https://codereview.chromium.org/633873002/diff/190001/content/browser/service_worker/service_worker_database_task_manager.cc File content/browser/service_worker/service_worker_database_task_manager.cc (right): https://codereview.chromium.org/633873002/diff/190001/content/browser/service_worker/service_worker_database_task_manager.cc#newcode22 content/browser/service_worker/service_worker_database_task_manager.cc:22: pool->GetNamedSequenceToken(kServiceWorkerDatabaseTaskSequenceTokenName); In the existing code, each swcontext uses ...
6 years, 2 months ago (2014-10-16 01:15:05 UTC) #24
falken
Thanks for the reviews. https://codereview.chromium.org/633873002/diff/190001/content/browser/service_worker/service_worker_database_task_manager.cc File content/browser/service_worker/service_worker_database_task_manager.cc (right): https://codereview.chromium.org/633873002/diff/190001/content/browser/service_worker/service_worker_database_task_manager.cc#newcode22 content/browser/service_worker/service_worker_database_task_manager.cc:22: pool->GetNamedSequenceToken(kServiceWorkerDatabaseTaskSequenceTokenName); On 2014/10/16 01:15:04, michaeln ...
6 years, 2 months ago (2014-10-16 02:04:51 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/633873002/210001
6 years, 2 months ago (2014-10-16 02:08:53 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/79630) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/69237) win_gpu ...
6 years, 2 months ago (2014-10-16 02:16:20 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/633873002/230001
6 years, 2 months ago (2014-10-16 03:07:43 UTC) #31
commit-bot: I haz the power
Committed patchset #9 (id:230001)
6 years, 2 months ago (2014-10-16 04:46:57 UTC) #32
commit-bot: I haz the power
6 years, 2 months ago (2014-10-16 04:47:55 UTC) #33
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/7253028818568d4233acc2031fe0a82f6d8d99b9
Cr-Commit-Position: refs/heads/master@{#299842}

Powered by Google App Engine
This is Rietveld 408576698