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

Issue 1154573005: Expose Durable Storage API to script (Closed)

Created:
5 years, 7 months ago by dgrogan
Modified:
5 years, 3 months ago
CC:
blink-reviews, kinuko+fileapi, Lalit Maganti, nhiroki, tzik
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Expose Durable Storage API to script Exposes 2 javascript functions to script: requestPersistent() and persistentPermission(). StorageManager calls into the permission service, which handles IPC and setting or retrieving the appropriate content settings. Chromium side is here: https://codereview.chromium.org/1164073005/ BUG=482814 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200362

Patch Set 1 #

Patch Set 2 : much progress #

Patch Set 3 : promises resolve and strings are ready for translating #

Patch Set 4 : update to ToT #

Patch Set 5 : ToT #

Patch Set 6 : ToT #

Patch Set 7 : uploaded the test results #

Total comments: 4

Patch Set 8 : ToT #

Total comments: 6

Patch Set 9 : rename WebSomeCallbacks and SomeCallbacks #

Total comments: 10

Patch Set 10 : ToT #

Patch Set 11 : switched to insufficient testharness test #

Patch Set 12 : respond to jsbell comments #

Total comments: 2

Patch Set 13 : Now with working testharness test #

Patch Set 14 : hacked up DEPS #

Total comments: 1

Patch Set 15 : Implement persistentPermission #

Patch Set 16 : ToT #

Total comments: 4

Patch Set 17 : ToT and using Permission::getClient #

Patch Set 18 : actually move to getClient #

Patch Set 19 : use generic permission request instead of durable #

Patch Set 20 : remove blank line from WebPermissionClient.h #

Patch Set 21 : cleanup for review #

Patch Set 22 : update test title #

Patch Set 23 : remove WTF_LOG_ERROR debug statement #

Patch Set 24 : run clang format over StorageManager.cpp #

Patch Set 25 : update comment #

Total comments: 46

Patch Set 26 : respond to all the comments #

Patch Set 27 : ToT #

Patch Set 28 : fix up ScriptPromiseResolver #

Total comments: 8

Patch Set 29 : change DEPS comment, clean stuff up #

Total comments: 1

Patch Set 30 : ToT #

Total comments: 3

Patch Set 31 : ToT #

Patch Set 32 : remove one layout test for landing 3rd #

Patch Set 33 : just reset the results #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -6 lines) Patch
A + LayoutTests/http/tests/security/powerfulFeatureRestrictions/durable-storage-on-insecure-origin.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +3 lines, -6 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +5 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +4 lines, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +3 lines, -0 lines 0 comments Download
M Source/modules/quota/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/quota/NavigatorStorageQuota.h View 3 chunks +4 lines, -0 lines 0 comments Download
M Source/modules/quota/NavigatorStorageQuota.cpp View 3 chunks +14 lines, -0 lines 0 comments Download
M Source/modules/quota/NavigatorStorageQuota.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +7 lines, -0 lines 0 comments Download
A Source/modules/quota/StorageManager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +26 lines, -0 lines 0 comments Download
A Source/modules/quota/StorageManager.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +102 lines, -0 lines 0 comments Download
A Source/modules/quota/StorageManager.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +19 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +1 line, -0 lines 0 comments Download
M public/platform/modules/permissions/WebPermissionType.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 56 (12 generated)
dgrogan
Hi Michael and Josh, This patch is not ready for landing but I'd appreciate feedback. ...
5 years, 6 months ago (2015-06-19 22:34:08 UTC) #2
michaeln
woohoo! https://codereview.chromium.org/1154573005/diff/120001/Source/modules/quota/StorageManager.idl File Source/modules/quota/StorageManager.idl (right): https://codereview.chromium.org/1154573005/diff/120001/Source/modules/quota/StorageManager.idl#newcode14 Source/modules/quota/StorageManager.idl:14: Promise<PersistentStoragePermission> persistentPermission(); > Exposed=(Window,Worker) Is the worker part ...
5 years, 6 months ago (2015-06-19 23:24:50 UTC) #3
dgrogan
Michael, thanks so much for taking a look. https://codereview.chromium.org/1154573005/diff/120001/Source/modules/quota/StorageManager.idl File Source/modules/quota/StorageManager.idl (right): https://codereview.chromium.org/1154573005/diff/120001/Source/modules/quota/StorageManager.idl#newcode14 Source/modules/quota/StorageManager.idl:14: Promise<PersistentStoragePermission> ...
5 years, 5 months ago (2015-06-30 00:48:44 UTC) #4
michaeln
On 2015/06/30 00:48:44, dgrogan wrote: > Michael, thanks so much for taking a look. > ...
5 years, 5 months ago (2015-07-01 01:32:03 UTC) #5
jsbell
Handful of nits... https://codereview.chromium.org/1154573005/diff/140001/LayoutTests/storage/quota/durability.html File LayoutTests/storage/quota/durability.html (right): https://codereview.chromium.org/1154573005/diff/140001/LayoutTests/storage/quota/durability.html#newcode3 LayoutTests/storage/quota/durability.html:3: <script src="../../resources/js-test.js"></script> Can you implement this ...
5 years, 5 months ago (2015-07-01 17:43:30 UTC) #6
dgrogan
5 years, 5 months ago (2015-07-02 00:29:44 UTC) #8
dgrogan
On 2015/07/01 01:32:03, michaeln wrote: > On 2015/06/30 00:48:44, dgrogan wrote: > > Michael, thanks ...
5 years, 5 months ago (2015-07-02 00:30:06 UTC) #9
mlamouri (slow - plz ping)
On 2015/07/02 at 00:30:06, dgrogan wrote: > On 2015/07/01 01:32:03, michaeln wrote: > > On ...
5 years, 5 months ago (2015-07-02 09:45:45 UTC) #10
dgrogan
https://codereview.chromium.org/1154573005/diff/140001/LayoutTests/storage/quota/durability.html File LayoutTests/storage/quota/durability.html (right): https://codereview.chromium.org/1154573005/diff/140001/LayoutTests/storage/quota/durability.html#newcode3 LayoutTests/storage/quota/durability.html:3: <script src="../../resources/js-test.js"></script> On 2015/07/01 17:43:29, jsbell wrote: > Can ...
5 years, 5 months ago (2015-07-07 04:03:25 UTC) #11
dgrogan
https://codereview.chromium.org/1154573005/diff/220001/LayoutTests/storage/quota/durability.html File LayoutTests/storage/quota/durability.html (right): https://codereview.chromium.org/1154573005/diff/220001/LayoutTests/storage/quota/durability.html#newcode10 LayoutTests/storage/quota/durability.html:10: // assert_class_string(promise, "Promise"); jsbell@: I'd like to test 2 ...
5 years, 5 months ago (2015-07-07 04:25:14 UTC) #12
jsbell
https://codereview.chromium.org/1154573005/diff/220001/LayoutTests/storage/quota/durability.html File LayoutTests/storage/quota/durability.html (right): https://codereview.chromium.org/1154573005/diff/220001/LayoutTests/storage/quota/durability.html#newcode10 LayoutTests/storage/quota/durability.html:10: // assert_class_string(promise, "Promise"); On 2015/07/07 04:25:14, dgrogan wrote: > ...
5 years, 5 months ago (2015-07-07 16:51:05 UTC) #13
dgrogan
https://codereview.chromium.org/1154573005/diff/260001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/260001/Source/modules/quota/StorageManager.cpp#newcode21 Source/modules/quota/StorageManager.cpp:21: WebPermissionClient* getPermissionClient(ExecutionContext* executionContext) Mounir, you have a TODO about ...
5 years, 5 months ago (2015-07-09 02:56:05 UTC) #14
mlamouri (slow - plz ping)
https://codereview.chromium.org/1154573005/diff/300001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/300001/Source/modules/quota/StorageManager.cpp#newcode21 Source/modules/quota/StorageManager.cpp:21: WebPermissionClient* getPermissionClient(ExecutionContext* executionContext) Maybe you can move that to ...
5 years, 5 months ago (2015-07-16 10:12:18 UTC) #15
dgrogan
https://codereview.chromium.org/1154573005/diff/300001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/300001/Source/modules/quota/StorageManager.cpp#newcode21 Source/modules/quota/StorageManager.cpp:21: WebPermissionClient* getPermissionClient(ExecutionContext* executionContext) On 2015/07/16 10:12:17, Mounir Lamouri wrote: ...
5 years, 5 months ago (2015-07-16 19:15:53 UTC) #16
dgrogan
This is ready for a real review. jsbell, can you look at at least StorageManager.idl, ...
5 years, 4 months ago (2015-08-01 00:02:01 UTC) #18
jsbell
Feedback on my assignments. https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html File LayoutTests/storage/quota/durability-basics.html (right): https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html#newcode1 LayoutTests/storage/quota/durability-basics.html:1: <!DOCTYPE html> Since this is ...
5 years, 4 months ago (2015-08-03 19:57:41 UTC) #19
jsbell
https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html File LayoutTests/storage/quota/durability-basics.html (right): https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html#newcode1 LayoutTests/storage/quota/durability-basics.html:1: <!DOCTYPE html> On 2015/08/03 19:57:41, jsbell wrote: > We'd ...
5 years, 4 months ago (2015-08-03 23:11:16 UTC) #20
mlamouri (slow - plz ping)
+lalitm@ FYI
5 years, 4 months ago (2015-08-04 13:03:51 UTC) #21
mlamouri (slow - plz ping)
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS File Source/modules/quota/DEPS (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS#newcode8 Source/modules/quota/DEPS:8: "+modules/permissions", I don't think that's right. The end goal ...
5 years, 4 months ago (2015-08-04 13:15:19 UTC) #22
Lalit Maganti
Not a reviewer but I've become quite familiar with the code over the last few ...
5 years, 4 months ago (2015-08-04 13:27:41 UTC) #24
jsbell
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/NavigatorStorageQuota.idl File Source/modules/quota/NavigatorStorageQuota.idl (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/NavigatorStorageQuota.idl#newcode29 Source/modules/quota/NavigatorStorageQuota.idl:29: [RuntimeEnabled=DurableStorage] readonly attribute StorageManager storage; On 2015/08/04 13:15:19, Mounir ...
5 years, 4 months ago (2015-08-04 15:32:04 UTC) #25
mlamouri (slow - plz ping)
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/NavigatorStorageQuota.idl File Source/modules/quota/NavigatorStorageQuota.idl (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/NavigatorStorageQuota.idl#newcode29 Source/modules/quota/NavigatorStorageQuota.idl:29: [RuntimeEnabled=DurableStorage] readonly attribute StorageManager storage; On 2015/08/04 at 15:32:04, ...
5 years, 4 months ago (2015-08-04 15:36:47 UTC) #26
jsbell
On 2015/08/04 15:36:47, Mounir Lamouri wrote: > Oh, I did not understand that. Maybe this ...
5 years, 4 months ago (2015-08-04 16:30:32 UTC) #27
dgrogan
Thanks for the comments all. Please take another look. https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html File LayoutTests/storage/quota/durability-basics.html (right): https://codereview.chromium.org/1154573005/diff/480001/LayoutTests/storage/quota/durability-basics.html#newcode1 LayoutTests/storage/quota/durability-basics.html:1: ...
5 years, 4 months ago (2015-08-06 23:52:03 UTC) #28
Lalit Maganti
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/StorageManager.cpp#newcode45 Source/modules/quota/StorageManager.cpp:45: ASSERT_NOT_REACHED(); On 2015/08/06 at 23:52:02, dgrogan wrote: > On ...
5 years, 4 months ago (2015-08-07 08:47:28 UTC) #29
mlamouri (slow - plz ping)
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS File Source/modules/quota/DEPS (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS#newcode8 Source/modules/quota/DEPS:8: "+modules/permissions", On 2015/08/06 at 23:52:02, dgrogan wrote: > On ...
5 years, 4 months ago (2015-08-07 10:19:14 UTC) #30
dgrogan
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS File Source/modules/quota/DEPS (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS#newcode8 Source/modules/quota/DEPS:8: "+modules/permissions", On 2015/08/07 10:19:14, Mounir Lamouri wrote: > On ...
5 years, 4 months ago (2015-08-07 17:24:54 UTC) #31
dgrogan
https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS File Source/modules/quota/DEPS (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS#newcode8 Source/modules/quota/DEPS:8: "+modules/permissions", On 2015/08/07 17:24:54, dgrogan wrote: > On 2015/08/07 ...
5 years, 4 months ago (2015-08-07 17:37:56 UTC) #33
haraken
On 2015/08/07 17:37:56, dgrogan wrote: > https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS > File Source/modules/quota/DEPS (right): > > https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/DEPS#newcode8 > ...
5 years, 4 months ago (2015-08-10 00:35:11 UTC) #34
jsbell
https://codereview.chromium.org/1154573005/diff/540001/LayoutTests/http/tests/storage/durability-basics.html File LayoutTests/http/tests/storage/durability-basics.html (right): https://codereview.chromium.org/1154573005/diff/540001/LayoutTests/http/tests/storage/durability-basics.html#newcode7 LayoutTests/http/tests/storage/durability-basics.html:7: test(function() { assert_true(!!navigator.storage); }, "These tests requires navigator.storage"); Nit ...
5 years, 4 months ago (2015-08-10 17:49:41 UTC) #35
jsbell
a few more nits, otherwise: lgtm https://codereview.chromium.org/1154573005/diff/540001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/540001/Source/modules/quota/StorageManager.cpp#newcode62 Source/modules/quota/StorageManager.cpp:62: if (securityOrigin->isUnique()) { ...
5 years, 4 months ago (2015-08-10 18:00:37 UTC) #36
dgrogan
https://codereview.chromium.org/1154573005/diff/540001/LayoutTests/http/tests/storage/durability-basics.html File LayoutTests/http/tests/storage/durability-basics.html (right): https://codereview.chromium.org/1154573005/diff/540001/LayoutTests/http/tests/storage/durability-basics.html#newcode7 LayoutTests/http/tests/storage/durability-basics.html:7: test(function() { assert_true(!!navigator.storage); }, "These tests requires navigator.storage"); On ...
5 years, 4 months ago (2015-08-10 18:39:56 UTC) #37
dgrogan
Mounir, could you take another look? https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/StorageManager.cpp File Source/modules/quota/StorageManager.cpp (right): https://codereview.chromium.org/1154573005/diff/480001/Source/modules/quota/StorageManager.cpp#newcode45 Source/modules/quota/StorageManager.cpp:45: ASSERT_NOT_REACHED(); On 2015/08/07 ...
5 years, 4 months ago (2015-08-10 22:26:41 UTC) #38
kinuko
lgtm for the stuff I care about. https://codereview.chromium.org/1154573005/diff/580001/Source/modules/quota/NavigatorStorageQuota.idl File Source/modules/quota/NavigatorStorageQuota.idl (right): https://codereview.chromium.org/1154573005/diff/580001/Source/modules/quota/NavigatorStorageQuota.idl#newcode21 Source/modules/quota/NavigatorStorageQuota.idl:21: // related ...
5 years, 4 months ago (2015-08-11 08:53:54 UTC) #39
mlamouri (slow - plz ping)
lgtm FTR, using "default" instead of "prompt" is bad for the platform consistency. Though, it ...
5 years, 4 months ago (2015-08-11 11:56:01 UTC) #40
dgrogan
Jochen, can you review the RuntimeEnabledFeatures.in change? Durable storage is being added behind the experimental-web-platform-features ...
5 years, 4 months ago (2015-08-11 19:07:51 UTC) #42
dgrogan
-jochen (traveling - slow), +pdr pdr, can you review RuntimeEnabledFeatures.in? Durable storage is being added ...
5 years, 4 months ago (2015-08-11 19:49:46 UTC) #44
pdr.
On 2015/08/11 at 19:49:46, dgrogan wrote: > -jochen (traveling - slow), +pdr > > pdr, ...
5 years, 4 months ago (2015-08-11 19:50:55 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154573005/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1154573005/620001
5 years, 4 months ago (2015-08-11 19:55:57 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/73347)
5 years, 4 months ago (2015-08-11 21:36:15 UTC) #50
dgrogan
jsbell@, can you review the changes to *webexposed*-expected.txt? It seems wrong that the interface is ...
5 years, 4 months ago (2015-08-11 22:48:26 UTC) #51
jsbell
On 2015/08/11 22:48:26, dgrogan wrote: > jsbell@, can you review the changes to *webexposed*-expected.txt? It ...
5 years, 4 months ago (2015-08-11 23:03:14 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154573005/640001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1154573005/640001
5 years, 4 months ago (2015-08-11 23:03:31 UTC) #55
commit-bot: I haz the power
5 years, 4 months ago (2015-08-12 00:35:14 UTC) #56
Message was sent while issue was closed.
Committed patchset #33 (id:640001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200362

Powered by Google App Engine
This is Rietveld 408576698