summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 00:50:32 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 00:50:32 +0000
commite7f48fe5924df6cbd42dff40731ba029d2503678 (patch)
tree2cb2c0b04399b134f5170ba4fa6554a141cfb146 /content/browser/geolocation
parente6e646d8463bfeb97894e756073add37a401c85b (diff)
downloadchromium_src-e7f48fe5924df6cbd42dff40731ba029d2503678.zip
chromium_src-e7f48fe5924df6cbd42dff40731ba029d2503678.tar.gz
chromium_src-e7f48fe5924df6cbd42dff40731ba029d2503678.tar.bz2
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
Diffstat (limited to 'content/browser/geolocation')
-rw-r--r--content/browser/geolocation/gps_location_provider_unittest_linux.cc13
1 files changed, 5 insertions, 8 deletions
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());