| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/geolocation/gps_location_provider_linux.h" | 5 #include "content/browser/geolocation/gps_location_provider_linux.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 UpdateListeners(); | 118 UpdateListeners(); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 void GpsLocationProviderLinux::ScheduleNextGpsPoll(int interval) { | 122 void GpsLocationProviderLinux::ScheduleNextGpsPoll(int interval) { |
| 123 weak_factory_.InvalidateWeakPtrs(); | 123 weak_factory_.InvalidateWeakPtrs(); |
| 124 MessageLoop::current()->PostDelayedTask( | 124 MessageLoop::current()->PostDelayedTask( |
| 125 FROM_HERE, | 125 FROM_HERE, |
| 126 base::Bind(&GpsLocationProviderLinux::DoGpsPollTask, | 126 base::Bind(&GpsLocationProviderLinux::DoGpsPollTask, |
| 127 weak_factory_.GetWeakPtr()), | 127 weak_factory_.GetWeakPtr()), |
| 128 interval); | 128 base::TimeDelta::FromMilliseconds(interval)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 LocationProviderBase* NewSystemLocationProvider() { | 131 LocationProviderBase* NewSystemLocationProvider() { |
| 132 return new GpsLocationProviderLinux(LibGps::New); | 132 return new GpsLocationProviderLinux(LibGps::New); |
| 133 } | 133 } |
| OLD | NEW |