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 #if defined(OS_WIN) |
| 164 return NULL; |
| 165 #else |
163 return content::NewSystemLocationProvider(); | 166 return content::NewSystemLocationProvider(); |
| 167 #endif |
164 } | 168 } |
165 | 169 |
166 base::Time GeolocationArbitratorImpl::GetTimeNow() const { | 170 base::Time GeolocationArbitratorImpl::GetTimeNow() const { |
167 return base::Time::Now(); | 171 return base::Time::Now(); |
168 } | 172 } |
169 | 173 |
170 bool GeolocationArbitratorImpl::IsNewPositionBetter( | 174 bool GeolocationArbitratorImpl::IsNewPositionBetter( |
171 const Geoposition& old_position, const Geoposition& new_position, | 175 const Geoposition& old_position, const Geoposition& new_position, |
172 bool from_same_provider) const { | 176 bool from_same_provider) const { |
173 // Updates location_info if it's better than what we currently have, | 177 // Updates location_info if it's better than what we currently have, |
(...skipping 17 matching lines...) Expand all Loading... |
191 } | 195 } |
192 } | 196 } |
193 return false; | 197 return false; |
194 } | 198 } |
195 | 199 |
196 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { | 200 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { |
197 return is_permission_granted_; | 201 return is_permission_granted_; |
198 } | 202 } |
199 | 203 |
200 } // namespace content | 204 } // namespace content |
OLD | NEW |