[Webkit-unassigned] [Bug 125871] Allow partial application of PlugInAutoStart tables based on timestamp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 18 01:01:48 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125871





--- Comment #7 from Jon Lee <jonlee at apple.com>  2013-12-18 00:59:54 PST ---
(From update of attachment 219469)
View in context: https://bugs.webkit.org/attachment.cgi?id=219469&action=review

> Source/WebKit2/ChangeLog:18
> +            with a lambda that lets policies created after a certain time pass.

errrr-- "before time" in the function name, but let policies pass "after a certain time"?

> Source/WebKit2/UIProcess/API/C/WKContext.cpp:394
> +void WKContextApplyPlugInAutoStartOriginsAddedBeforeTime(WKContextRef contextRef, WKDictionaryRef dictionaryRef, double time)

"Apply" seems like the wrong verb to use here. The method isn't taking the provided dictionary and amended the existing one with it, which is what I think of when I see "apply". Maybe something more along the lines of "SetPlugInAutoStartOrigins{BeforeTime,UsingTimeCutoff}"?

> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:52
> +static double timeExpirationTimeWasGenerated(double expirationTime)

awkward naming. "originationTimeFromExpiration"?

> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:121
> +void PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest(ImmutableDictionary const& table, std::function<bool(double timestamp)> predicate)

Wouldn't it be better for the predicate to be named properly, for readability in the code? Like "isExpirationTimeAcceptable"?
Also seems that proper style is "const ImmutableDictionary&".

-- 
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