| 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/location_arbitrator.h" | 5 #include "content/browser/geolocation/location_arbitrator.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" |
| 11 #include "content/browser/geolocation/arbitrator_dependency_factory.h" | 11 #include "content/browser/geolocation/arbitrator_dependency_factory.h" |
| 12 #include "content/public/browser/access_token_store.h" |
| 13 |
| 14 using content::AccessTokenStore; |
| 12 | 15 |
| 13 namespace { | 16 namespace { |
| 14 | 17 |
| 15 const char* kDefaultNetworkProviderUrl = "https://maps.googleapis.com/maps/api/b
rowserlocation/json"; | 18 const char* kDefaultNetworkProviderUrl = "https://maps.googleapis.com/maps/api/b
rowserlocation/json"; |
| 16 GeolocationArbitratorDependencyFactory* g_dependency_factory_for_test = NULL; | 19 GeolocationArbitratorDependencyFactory* g_dependency_factory_for_test = NULL; |
| 17 | 20 |
| 18 } // namespace | 21 } // namespace |
| 19 | 22 |
| 20 // To avoid oscillations, set this to twice the expected update interval of a | 23 // To avoid oscillations, set this to twice the expected update interval of a |
| 21 // a GPS-type location provider (in case it misses a beat) plus a little. | 24 // a GPS-type location provider (in case it misses a beat) plus a little. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 159 } |
| 157 | 160 |
| 158 bool GeolocationArbitrator::HasPermissionBeenGranted() const { | 161 bool GeolocationArbitrator::HasPermissionBeenGranted() const { |
| 159 return most_recent_authorized_frame_.is_valid(); | 162 return most_recent_authorized_frame_.is_valid(); |
| 160 } | 163 } |
| 161 | 164 |
| 162 void GeolocationArbitrator::SetDependencyFactoryForTest( | 165 void GeolocationArbitrator::SetDependencyFactoryForTest( |
| 163 GeolocationArbitratorDependencyFactory* dependency_factory) { | 166 GeolocationArbitratorDependencyFactory* dependency_factory) { |
| 164 g_dependency_factory_for_test = dependency_factory; | 167 g_dependency_factory_for_test = dependency_factory; |
| 165 } | 168 } |
| OLD | NEW |