Bug 55172

Summary: Need WK2 API to view/manage origins with LocalStorage
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit2Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 51878    
Bug Blocks:    
Attachments:
Description Flags
Patch v1
sam: review+, beidson: commit-queue-
2nd Patch v1 mitz: review+, beidson: commit-queue-

Description Brady Eidson 2011-02-24 12:10:27 PST
Need WK2 API to view/manage origins with LocalStorage

In radar as <rdar://problem/8762095>
Comment 1 Brady Eidson 2011-02-24 12:52:37 PST
Created attachment 83705 [details]
Patch v1
Comment 2 WebKit Review Bot 2011-02-24 12:54:48 PST
Attachment 83705 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:33:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp:31:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 3 in 28 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brian Weinstein 2011-02-24 13:02:45 PST
Comment on attachment 83705 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=83705&action=review

Looks good, just a few style nits.

> Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp:95
> +        return;

The spacing with the early return for hasValidProcess is different here than in deleteEntriesForOrigin and getKeyValueStorageOrigins. I'd say add a blank line here to be consistent.

> Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:75
> +        identifiers.uncheckedAppend(originData);

Do you ever expect the SecurityOrigin to be null? If not - you could do Vector<SecurityOriginData> identifiers(size) - and then just do identifiers[i] = originData

> Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:83
> +    // FIXME <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172: Implement once https://bugs.webkit.org/show_bug.cgi?id=51878 is resolved.

Colon after the FIXME - and maybe a notImplemented would be nice?

> Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:88
> +    // FIXME <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172: Implement once https://bugs.webkit.org/show_bug.cgi?id=51878 is resolved.

Ditto.
Comment 4 Brady Eidson 2011-02-24 16:13:06 PST
(In reply to comment #3)
> (From update of attachment 83705 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=83705&action=review
> 
> Looks good, just a few style nits.
> 
> > Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp:95
> > +        return;
> 
> The spacing with the early return for hasValidProcess is different here than in deleteEntriesForOrigin and getKeyValueStorageOrigins. I'd say add a blank line here to be consistent.

Done.

> > Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:75
> > +        identifiers.uncheckedAppend(originData);
> 
> Do you ever expect the SecurityOrigin to be null? If not - you could do Vector<SecurityOriginData> identifiers(size) - and then just do identifiers[i] = originData

If it was null, it'd be indicative of both a WebCore bug and a HashSet bug.  This is a Vector of SecurityOriginDatas I'm uncheckedAppend()'ing to, so no, it can't be null.

> > Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:83
> > +    // FIXME <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172: Implement once https://bugs.webkit.org/show_bug.cgi?id=51878 is resolved.
> 
> Colon after the FIXME - and maybe a notImplemented would be nice?
> 
> > Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:88
> > +    // FIXME <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172: Implement once https://bugs.webkit.org/show_bug.cgi?id=51878 is resolved.
> 
> Ditto.

Both of these done.
Comment 5 Brady Eidson 2011-02-24 18:16:06 PST
Landed first piece in r79654
Comment 6 Brady Eidson 2011-02-24 18:17:02 PST
Remaining work is blocked on https://bugs.webkit.org/show_bug.cgi?id=51878
Comment 7 Brady Eidson 2011-03-14 00:16:06 PDT
Created attachment 85655 [details]
2nd Patch v1
Comment 8 Brady Eidson 2011-03-14 00:44:32 PDT
Landed in r81005