Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: content/browser/geolocation/gps_location_provider_unittest_linux.cc

Issue 8734017: base::Bind: More random cleanups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix 2. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/mach_broker_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/gps_location_provider_unittest_linux.cc
diff --git a/content/browser/geolocation/gps_location_provider_unittest_linux.cc b/content/browser/geolocation/gps_location_provider_unittest_linux.cc
index fba137bc9d9eded05c8c49a1ade31214ca2f15ed..bff72db9671ad0a6f74b97588a8040954385ff30 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());
« no previous file with comments | « no previous file | content/browser/mach_broker_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698