| 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 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ |
| 6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // testing classes. | 62 // testing classes. |
| 63 virtual AccessTokenStore* NewAccessTokenStore(); | 63 virtual AccessTokenStore* NewAccessTokenStore(); |
| 64 virtual std::unique_ptr<LocationProvider> NewNetworkLocationProvider( | 64 virtual std::unique_ptr<LocationProvider> NewNetworkLocationProvider( |
| 65 AccessTokenStore* access_token_store, | 65 AccessTokenStore* access_token_store, |
| 66 net::URLRequestContextGetter* context, | 66 net::URLRequestContextGetter* context, |
| 67 const GURL& url, | 67 const GURL& url, |
| 68 const base::string16& access_token); | 68 const base::string16& access_token); |
| 69 virtual std::unique_ptr<LocationProvider> NewSystemLocationProvider(); | 69 virtual std::unique_ptr<LocationProvider> NewSystemLocationProvider(); |
| 70 virtual base::Time GetTimeNow() const; | 70 virtual base::Time GetTimeNow() const; |
| 71 | 71 |
| 72 GeolocationDelegate* GetDelegateForTesting() { return delegate_; } | 72 private: |
| 73 friend class TestingLocationArbitrator; |
| 73 | 74 |
| 74 private: | |
| 75 // Provider will either be added to |providers_| or | 75 // Provider will either be added to |providers_| or |
| 76 // deleted on error (e.g. it fails to start). | 76 // deleted on error (e.g. it fails to start). |
| 77 void RegisterProvider(std::unique_ptr<LocationProvider> provider); | 77 void RegisterProvider(std::unique_ptr<LocationProvider> provider); |
| 78 | 78 |
| 79 void RegisterSystemProvider(); | 79 void RegisterSystemProvider(); |
| 80 void OnAccessTokenStoresLoaded( | 80 void OnAccessTokenStoresLoaded( |
| 81 AccessTokenStore::AccessTokenMap access_token_map, | 81 AccessTokenStore::AccessTokenMap access_token_map, |
| 82 net::URLRequestContextGetter* context_getter); | 82 net::URLRequestContextGetter* context_getter); |
| 83 void DoStartProviders(); | 83 void DoStartProviders(); |
| 84 | 84 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 DISALLOW_COPY_AND_ASSIGN(LocationArbitratorImpl); | 118 DISALLOW_COPY_AND_ASSIGN(LocationArbitratorImpl); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 // Factory functions for the various types of location provider to abstract | 121 // Factory functions for the various types of location provider to abstract |
| 122 // over the platform-dependent implementations. | 122 // over the platform-dependent implementations. |
| 123 LocationProvider* NewSystemLocationProvider(); | 123 LocationProvider* NewSystemLocationProvider(); |
| 124 | 124 |
| 125 } // namespace content | 125 } // namespace content |
| 126 | 126 |
| 127 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ | 127 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ |
| OLD | NEW |