Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/location_arbitrator_impl.h" | 5 #include "content/browser/geolocation/location_arbitrator_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 #if defined(OS_ANDROID) | 153 #if defined(OS_ANDROID) |
| 154 // Android uses its own SystemLocationProvider. | 154 // Android uses its own SystemLocationProvider. |
| 155 return NULL; | 155 return NULL; |
| 156 #else | 156 #else |
| 157 return new NetworkLocationProvider(access_token_store, context, url, | 157 return new NetworkLocationProvider(access_token_store, context, url, |
| 158 access_token); | 158 access_token); |
| 159 #endif | 159 #endif |
| 160 } | 160 } |
| 161 | 161 |
| 162 LocationProvider* GeolocationArbitratorImpl::NewSystemLocationProvider() { | 162 LocationProvider* GeolocationArbitratorImpl::NewSystemLocationProvider() { |
| 163 return content::NewSystemLocationProvider(); | 163 return content::NewSystemLocationProvider(); |
|
bulach
2013/08/09 13:06:18
perhaps put the ifdef here to cut the layers?
Michael van Ouwerkerk
2013/08/09 13:27:02
Done.
| |
| 164 } | 164 } |
| 165 | 165 |
| 166 base::Time GeolocationArbitratorImpl::GetTimeNow() const { | 166 base::Time GeolocationArbitratorImpl::GetTimeNow() const { |
| 167 return base::Time::Now(); | 167 return base::Time::Now(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool GeolocationArbitratorImpl::IsNewPositionBetter( | 170 bool GeolocationArbitratorImpl::IsNewPositionBetter( |
| 171 const Geoposition& old_position, const Geoposition& new_position, | 171 const Geoposition& old_position, const Geoposition& new_position, |
| 172 bool from_same_provider) const { | 172 bool from_same_provider) const { |
| 173 // Updates location_info if it's better than what we currently have, | 173 // Updates location_info if it's better than what we currently have, |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 | 195 |
| 196 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { | 196 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { |
| 197 return is_permission_granted_; | 197 return is_permission_granted_; |
| 198 } | 198 } |
| 199 | 199 |
| 200 #if defined(OS_WIN) | |
| 201 LocationProvider* NewSystemLocationProvider() { | |
| 202 return NULL; | |
| 203 } | |
| 204 #endif | |
| 205 | |
| 200 } // namespace content | 206 } // namespace content |
| OLD | NEW |