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 #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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 void StartProviders(bool enable_high_accuracy) override; | 53 void StartProviders(bool enable_high_accuracy) override; |
| 54 void StopProviders() override; | 54 void StopProviders() override; |
| 55 void OnPermissionGranted() override; | 55 void OnPermissionGranted() override; |
| 56 bool HasPermissionBeenGranted() const override; | 56 bool HasPermissionBeenGranted() const override; |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 AccessTokenStore* GetAccessTokenStore(); | 59 AccessTokenStore* GetAccessTokenStore(); |
| 60 | 60 |
| 61 // These functions are useful for injection of dependencies in derived | 61 // These functions are useful for injection of dependencies in derived |
| 62 // testing classes. | 62 // testing classes. |
| 63 virtual AccessTokenStore* NewAccessTokenStore(); | 63 virtual scoped_refptr<AccessTokenStore> NewAccessTokenStore(); |
|
Wez
2016/07/12 21:55:47
If you're changing this then I'd suggest also upda
mcasas
2016/07/15 22:45:54
Done.
| |
| 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 private: | 72 private: |
| 73 friend class TestingLocationArbitrator; | 73 friend class TestingLocationArbitrator; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 Geoposition position_; | 113 Geoposition position_; |
| 114 | 114 |
| 115 // Tracks whether providers should be running. | 115 // Tracks whether providers should be running. |
| 116 bool is_running_; | 116 bool is_running_; |
| 117 | 117 |
| 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(); |
|
Wez
2016/07/12 21:55:47
nit: While we're here... it's weird that this is a
Michael van Ouwerkerk
2016/07/13 10:56:34
The virtual member function NewSystemLocationProvi
mcasas
2016/07/15 22:45:54
Done.
| |
| 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 |