From: Steve Block Date: Tue, 6 Oct 2009 11:52:52 +0000 (+0100) Subject: Fixes a couple of style problems and a minor TODO in WebKit Geolocation. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0e9c45127ab5a756565f359bb9120fe4cef35b8f;p=android-x86%2Fexternal-webkit.git Fixes a couple of style problems and a minor TODO in WebKit Geolocation. --- diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp index 9dcef6fb0..9e1c9198e 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.cpp +++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp @@ -29,7 +29,6 @@ #include // For jniRegisterNativeMethods #include // For getJNIEnv -#include "Frame.h" #include "Geoposition.h" #include "PositionError.h" #include "PositionOptions.h" @@ -300,9 +299,8 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options) // On Android, high power == GPS. Set whether to use GPS before we start the // implementation. - // FIXME: Checking for the presence of options will probably not be required - // once WebKit bug 27254 is fixed. - if (options && options->enableHighAccuracy()) + ASSERT(options); + if (options->enableHighAccuracy()) m_javaBridge->setEnableGps(true); if (!haveJavaBridge) @@ -346,7 +344,8 @@ void GeolocationServiceAndroid::newErrorAvailable(PassRefPtr erro errorOccurred(); } -void GeolocationServiceAndroid::timerFired(Timer* timer) { +void GeolocationServiceAndroid::timerFired(Timer* timer) +{ ASSERT(&m_timer == timer); ASSERT(m_lastPosition || m_lastError); if (m_lastPosition) diff --git a/WebCore/platform/android/GeolocationServiceAndroid.h b/WebCore/platform/android/GeolocationServiceAndroid.h index 90a8864dd..f233f9aa3 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.h +++ b/WebCore/platform/android/GeolocationServiceAndroid.h @@ -43,7 +43,6 @@ namespace WebCore { public: static GeolocationService* create(GeolocationServiceClient*); - GeolocationServiceAndroid(GeolocationServiceClient*); virtual ~GeolocationServiceAndroid() {}; virtual bool startUpdating(PositionOptions*); @@ -58,6 +57,8 @@ namespace WebCore { void timerFired(Timer* timer); private: + GeolocationServiceAndroid(GeolocationServiceClient*); + static bool isPositionMovement(Geoposition* position1, Geoposition* position2); static bool isPositionMoreAccurate(Geoposition* position1, Geoposition* position2); static bool isPositionMoreTimely(Geoposition* position1, Geoposition* position2);