[Webkit-unassigned] [Bug 54516] [chromium] Add WebKit Chromium hooks allowing access to NetworkStateNotifier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 11:01:57 PST 2011


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





--- Comment #6 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2011-02-23 11:01:57 PST ---
(From update of attachment 82671)
View in context: https://bugs.webkit.org/attachment.cgi?id=82671&action=review

> Source/WebCore/platform/network/NetworkStateNotifier.h:73
> +    void networkStateChange(bool online);

It might be nice to keep the ANDROID and CHROMIUM ports similar.

It might also make more sense to name this function as a setter
for the onLine property.  setOnLine(bool onLine)

This way you do not need to define an enum at this level, and it
nicely mirrors the NetworkStateNotifier::onLine getter.

If you go the setOnLine route, you could define that in
NetworkStateNotifier.cpp behind an #ifdef as it would be the
trivial implementation that other ports could also use.  This
would allow you to kill NetworkStateNotifierAndroid.cpp and
NetworkStateNotifierChromium.cpp.

> Source/WebKit/chromium/public/WebNetworkStateNotifier.h:38
> +class WebNetworkStateNotifier {

Given my comments about WebCore::NetworkStateNotifier.  I now wonder
if this shouldn't just become a simple setter too: setOnLine(bool onLine)

I think the name of the method "networkStateChange" led me to want to
define enums, but when a simple boolean property setter will do, it seems
like it is better to just go with that.

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