[webkit-reviews] review granted: [Bug 118266] [WK2] Clean up private browsing session tracking : [Attachment 205844] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 1 16:59:16 PDT 2013


Brady Eidson <beidson at apple.com> has granted Alexey Proskuryakov
<ap at webkit.org>'s request for review:
Bug 118266: [WK2] Clean up private browsing session tracking
https://bugs.webkit.org/show_bug.cgi?id=118266

Attachment 205844: proposed patch
https://bugs.webkit.org/attachment.cgi?id=205844&action=review

------- Additional Comments from Brady Eidson <beidson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=205844&action=review


> Source/WebKit2/ChangeLog:17
> +	   API was called, rely on WebPrefences tracking.

typo WebPreferences*

> Source/WebKit2/ChangeLog:36
> +	   WebContext to know when any page groups are in provate brosing mode.


provate brosing!!!

> Source/WebKit2/UIProcess/WebPreferences.cpp:67
> +    if (privateBrowsingEnabled()) {
> +	   if (!privateBrowsingPageGroupCount++)
> +	       WebContext::willStartUsingPrivateBrowsing();
> +    }

I think doing a compare with the postincrement makes this less readable than:
if (privateBrowsingEnabled()) {
    if (!privateBrowsingPageGroupCount)
	WebContext::willStartUsingPrivateBrowsing();
    ++privateBrowsingPageGroupCount;
}

> Source/WebKit2/UIProcess/WebPreferences.cpp:76
> +    if (privateBrowsingEnabled()) {
> +	   if (!--privateBrowsingPageGroupCount)
> +	       WebContext::willStopUsingPrivateBrowsing();
> +    }

I think doing a compare with the preincrement makes this less readable than:

if (privateBrowsingEnabled()) {
    --privateBrowsingPageGroupCount;
    if (!privateBrowsingPageGroupCount)
	WebContext::willStopUsingPrivateBrowsing();
}


More information about the webkit-reviews mailing list