Re: Storage Quota API

Please don't use errorCallback/SuccessCallback. That's not used in any
other APIs that are part of the cross-browser web platform. Instead
return a request object on which events are fired.

Don't use enums as the syntax sucks in JS. Use strings instead. We're
making the same transition in a lot of other APIs.

There's also a problem in that Gecko treats IndexedDB as permanent
quota by default and Chrome treats it as temporary. Not sure how to
solve that problem.

You guys have this prefixed in your implementation for now, right?

/ Jonas

On Mon, Sep 26, 2011 at 2:49 PM, Charles Pritchard <chuck@jumis.com> wrote:
> Though unstable, Chromium via WebKit has introduced an API for working with
> storage quotas:
>
> https://groups.google.com/a/chromium.org/group/chromium-html5/msg/5261d24266ba4366
>
> In brief:
>
>  void queryUsageAndQuota(
>      unsigned short storageType,
>      optional StorageInfoUsageCallback successCallback,
>      optional StorageInfoErrorCallback errorCallback);
>  // Requests a new quota.  Requesting a larger quota may require user's
>  // explicit permission via UI prompting / infobar.
>
>  void requestQuota(
>      unsigned short storageType,
>      unsigned long long newQuotaInBytes,
>      optional StorageInfoQuotaCallback successCallback,
>      optional StorageInfoErrorCallback errorCallback);
> };
>
>
> This API works across all storage types except localStorage, as localStorage
> is unique.
>
> It spans IndexedDB, FileSystem, AppCache and for those that are carrying it,
> WebSQL.
>
>
> -Charles
>
>

Received on Monday, 26 September 2011 23:44:57 UTC