[Webkit-unassigned] [Bug 57849] [Chromium] Add WebKit API to query and request unified offline-storage quota
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 6 19:41:04 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=57849
--- Comment #11 from Kinuko Yasuda <kinuko at chromium.org> 2011-04-06 19:41:03 PST ---
(From update of attachment 88237)
View in context: https://bugs.webkit.org/attachment.cgi?id=88237&action=review
>> Source/WebKit/chromium/public/WebFrameClient.h:368
>> + // Queries the origin's offline storage usage and quota information.
>
> this is not just for "offline" use, right? might be better to leave out that word.
>
> it seems like you should document what callback method will be called, and you
> should also document how the lifetime of the callbacks object is managed. who
> is responsible for deleting it?
Done.
>> Source/WebKit/chromium/public/WebFrameClient.h:369
>> + virtual void queryStorageUsage(
>
> maybe this method should be named queryStorageUsageAndQuota to better reflect
> what it does?
Done.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:36
>> +class WebStorageInfoCallbacks {
>
> maybe call this WebStorageQuotaCallbacks?
Done.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:37
>> +public:
>
> should this interface have a didFail method so that we have a way to abort
> early in case the web page is going away?
Done.
>>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:39
>>> + virtual void didQueryStorageUsage(unsigned long long usageInBytes, unsigned long long quotaInBytes) = 0;
>>
>> Why put these both in the same object? Will any method ever need both of them?
>
> didQueryStorageUsageAndQuota
Done. @Eric: it's just to simplify the callback handling implementation. We've done similar in FileSystem before so it's easier for me to follow the way.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:41
>> + // Callback for WebFrameClient::requestStorageQuota. This may return a smaller amount of quota than the requested, or may return zero when the quota is not enabled (for the requesting origin).
>
> WebKit doesn't have a line length limit but this seems a bit long.
Broke the line.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:42
>> + zero when the quota system is not enabled for the origin.
>
> This appears to be a mistake.
Added didFail instead.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:43
>> + virtual void didRequestStorageQuota(unsigned long long grantedQuotaInBytes) = 0;
>
> It seems like the name of this function should better correspond to the idea of
> being granted something:
>
> wasGrantedStorageQuota
Done.
>> Source/WebKit/chromium/public/WebStorageInfoCallbacks.h:46
>> + virtual ~WebStorageInfoCallbacks() {}
>
> Space between {}
Done.
>> Source/WebKit/chromium/public/WebStorageInfoType.h:36
>> +enum WebStorageInfoType {
>
> It seems like this is meant to describe quota / life-time policy. Maybe the name
> could be improved by using those terms?
>
> enum WebStorageQuotaType {
> WebStorageQuotaTemporary,
> WebStorageQuotaPersistent
> };
>
> I'm not sure that "quota" is the best term here either.
Changed the name to WebStorageQuotaType.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list