Re: Updating Quota API: Promise, Events and some more

2013-08-26 Thread Kinuko Yasuda
On Sat, Aug 24, 2013 at 3:45 PM, Jonas Sicking jo...@sicking.cc wrote: On Aug 23, 2013 12:30 AM, Kinuko Yasuda kin...@chromium.org wrote: On Tue, Aug 20, 2013 at 1:49 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Aug 19, 2013 at 9:32 AM, Kinuko Yasuda kin...@chromium.org wrote:

Re: Updating Quota API: Promise, Events and some more

2013-08-26 Thread Jonas Sicking
On Mon, Aug 26, 2013 at 1:39 AM, Kinuko Yasuda kin...@chromium.org wrote: Going back to the use case 2, let me try to explain a sample scenario: Let's say website A has stored some data in temporary storage. The amount of data was less than the per-site quota at the time (otherwise the write

Re: Updating Quota API: Promise, Events and some more

2013-08-26 Thread Kinuko Yasuda
On Tue, Aug 27, 2013 at 4:26 AM, Jonas Sicking jo...@sicking.cc wrote: Thanks, that explains the concern. However the proposed solution doesn't seem to solve the problem particularly well, for two reasons: First off, an API which lets the website track how much data it is storing, measured

Re: Updating Quota API: Promise, Events and some more

2013-08-24 Thread Jonas Sicking
On Aug 23, 2013 12:30 AM, Kinuko Yasuda kin...@chromium.org wrote: On Tue, Aug 20, 2013 at 1:49 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Aug 19, 2013 at 9:32 AM, Kinuko Yasuda kin...@chromium.org wrote: Actually, *only* having onstoragechange would solve both the use case of

Re: Updating Quota API: Promise, Events and some more

2013-08-23 Thread Kinuko Yasuda
On Tue, Aug 20, 2013 at 1:49 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Aug 19, 2013 at 9:32 AM, Kinuko Yasuda kin...@chromium.org wrote: Actually, *only* having onstoragechange would solve both the use case of detecting when you are running low on storage, as well as when you are

Re: Updating Quota API: Promise, Events and some more

2013-08-19 Thread Kinuko Yasuda
On Sat, Aug 17, 2013 at 3:01 AM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Aug 16, 2013 at 6:56 AM, Kinuko Yasuda kin...@chromium.org wrote: I had a few bike-sheddy comments as well. Now the new draft looks like: enum StorageType { temporary, persistent }; partial interface

Re: Updating Quota API: Promise, Events and some more

2013-08-19 Thread Jonas Sicking
On Mon, Aug 19, 2013 at 9:32 AM, Kinuko Yasuda kin...@chromium.org wrote: Actually, *only* having onstoragechange would solve both the use case of detecting when you are running low on storage, as well as when you are out of the woods. Especially if we provide both the quota and the amount of

Re: Updating Quota API: Promise, Events and some more

2013-08-16 Thread Kinuko Yasuda
On Fri, Aug 16, 2013 at 3:25 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Aug 15, 2013 at 9:44 AM, Kinuko Yasuda kin...@chromium.org wrote: requestQuota for temporary storage: I'd like to better understand the use case for requestQuota for temporary storage. Are implementations

Re: Updating Quota API: Promise, Events and some more

2013-08-16 Thread Jonas Sicking
On Fri, Aug 16, 2013 at 6:56 AM, Kinuko Yasuda kin...@chromium.org wrote: I had a few bike-sheddy comments as well. Now the new draft looks like: enum StorageType { temporary, persistent }; partial interface Navigator { readonly attribute StorageQuota storageQuota; };

Re: Updating Quota API: Promise, Events and some more

2013-08-15 Thread Kinuko Yasuda
Hi Joshua, On Thu, Aug 15, 2013 at 6:33 AM, Joshua Bell jsb...@chromium.org wrote: PromiseStorageType getStorageType((IDBObjectStore or Database or Entry) object); Promisevoid setStorageType((IDBObjectStore or Database or Entry) object, StorageType type); For IndexedDB, an object

Re: Updating Quota API: Promise, Events and some more

2013-08-15 Thread Kinuko Yasuda
Hi Jonas, On Thu, Aug 15, 2013 at 1:20 PM, Jonas Sicking jo...@sicking.cc wrote: Hi Kinuko, Very excited to see movement on this API. We are very interested in implementing this in Gecko once we reach an API that has the right feature set and polish! The recent changes definitely brings us

Re: Updating Quota API: Promise, Events and some more

2013-08-15 Thread Jonas Sicking
On Thu, Aug 15, 2013 at 9:44 AM, Kinuko Yasuda kin...@chromium.org wrote: requestQuota for temporary storage: I'd like to better understand the use case for requestQuota for temporary storage. Are implementations allowed to bring up a prompt when an increased temporary storage quota is

Re: Updating Quota API: Promise, Events and some more

2013-08-14 Thread Joshua Bell
On Tue, Aug 13, 2013 at 10:57 PM, Kinuko Yasuda kin...@chromium.org wrote: Hi all, It's been a while since Quota API's FPWD (http://www.w3.org/TR/quota-api/) was published and we've gotten several requests/feedbacks so far. To address some of the requests and to gain more consensus, I'm

Re: Updating Quota API: Promise, Events and some more

2013-08-14 Thread Kyaw Tun
How an IndexedDB database use persistent storage?

Re: Updating Quota API: Promise, Events and some more

2013-08-14 Thread Kyaw Tun
That still feels like an odd mix of two APIs. An approach that we (Moz + Google) have talked about would be to extend the IDBFactory.open() call with an options dictionary, e.g. request = indexedDB.open({ name: ..., version: ..., storage: temporary }); On a tangent... An open question is

Re: Updating Quota API: Promise, Events and some more

2013-08-14 Thread Jonas Sicking
Hi Kinuko, Very excited to see movement on this API. We are very interested in implementing this in Gecko once we reach an API that has the right feature set and polish! The recent changes definitely brings us closer to that which is great. Definitely looking forward to working with you on this.

Updating Quota API: Promise, Events and some more

2013-08-13 Thread Kinuko Yasuda
Hi all, It's been a while since Quota API's FPWD (http://www.w3.org/TR/quota-api/) was published and we've gotten several requests/feedbacks so far. To address some of the requests and to gain more consensus, I'm thinking about making following changes to the Quota API: * Use Promises rather