Add initial support for per-origin quotas to IndexedDB
Created attachment 82381 [details] Patch
please review
+ darin for api change
Comment on attachment 82381 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=82381&action=review > Source/WebCore/storage/IDBFactoryBackendImpl.cpp:265 > + m_currentQuotaMap.set(fileIdentifier, maximumSize); nit: Indented one space too much? > Source/WebCore/storage/IDBFactoryBackendImpl.h:70 > + typedef HashMap<String, int64_t> Quota; hmm, could it be called QuotaMap or something instead? just "Quota" makes me think of a scalar... lgtm
Created attachment 82509 [details] Patch
Comment on attachment 82509 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=82509&action=review > Source/WebKit/chromium/public/WebIDBFactory.h:60 > + static const long long DefaultQuota = -1; nit: use variable naming: fooBar maybe these variables should be named differently so that it is more apparent that they should be passed in for the "maximumSize" field? how about renaming maximumSize to quota? alternatively, you could rename the constants to defaultMaximumSize and unlimitedMaximumSize. also, since this expression of quota might appear in other WebKit storage APIs, maybe we should have some generalized expression of quota? maybe these constants should be pulled out to a separate header file?
(In reply to comment #6) > (From update of attachment 82509 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=82509&action=review > > > Source/WebKit/chromium/public/WebIDBFactory.h:60 > > + static const long long DefaultQuota = -1; > > nit: use variable naming: fooBar done > maybe these variables should be named differently so that it is more apparent > that they should be passed in for the "maximumSize" field? > > how about renaming maximumSize to quota? alternatively, you could rename the > constants to defaultMaximumSize and unlimitedMaximumSize. renamed to quota and defaultQuota > also, since this expression of quota might appear in other WebKit storage APIs, > maybe we should have some generalized expression of quota? maybe these constants > should be pulled out to a separate header file? This seems a bit premature, but I will add a fixme and I've cc'ed others who are involved in Chromium quota stuff as a FYI.
Committed r78645: <http://trac.webkit.org/changeset/78645>