From e7f48fe5924df6cbd42dff40731ba029d2503678 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Thu, 1 Dec 2011 00:50:32 +0000 Subject: base::Bind: More random cleanups. BUG=none TEST=none R=groby@chromium.org Review URL: http://codereview.chromium.org/8734017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112362 0039d316-1c4b-4281-b951-d872f2087c98 --- .../geolocation/gps_location_provider_unittest_linux.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'content/browser/geolocation') diff --git a/content/browser/geolocation/gps_location_provider_unittest_linux.cc b/content/browser/geolocation/gps_location_provider_unittest_linux.cc index fba137b..bff72db 100644 --- a/content/browser/geolocation/gps_location_provider_unittest_linux.cc +++ b/content/browser/geolocation/gps_location_provider_unittest_linux.cc @@ -168,13 +168,10 @@ TEST_F(GeolocationGpsProviderLinuxTests, GetPosition) { CheckValidPosition(MockLibGps::g_instance_->get_position_, position); } -class EnableGpsOpenTask : public Task { - public: - virtual void Run() { - CHECK(MockLibGps::g_instance_); - MockLibGps::g_instance_->gps_open_ret_ = 0; - } -}; +void EnableGpsOpenCallback() { + CHECK(MockLibGps::g_instance_); + MockLibGps::g_instance_->gps_open_ret_ = 0; +} TEST_F(GeolocationGpsProviderLinuxTests, LibGpsReconnect) { // Setup gpsd reconnect interval to be 1000ms to speed up test. @@ -198,7 +195,7 @@ TEST_F(GeolocationGpsProviderLinuxTests, LibGpsReconnect) { // This task makes gps_open() and LibGps::Start() to succeed after // 1500ms. MessageLoop::current()->PostDelayedTask( - FROM_HERE, new EnableGpsOpenTask(), 1500); + FROM_HERE, base::Bind(&EnableGpsOpenCallback), 1500); MessageLoop::current()->Run(); provider_->GetPosition(&position); EXPECT_TRUE(position.IsInitialized()); -- cgit v1.1