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_NETWORK_LOCATION_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
12 | 13 |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
19 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
20 #include "content/browser/geolocation/location_provider_base.h" | 20 #include "content/browser/geolocation/location_provider_base.h" |
21 #include "content/browser/geolocation/network_location_request.h" | 21 #include "content/browser/geolocation/network_location_request.h" |
22 #include "content/browser/geolocation/wifi_data_provider_manager.h" | 22 #include "content/browser/geolocation/wifi_data_provider_manager.h" |
23 #include "content/common/content_export.h" | 23 #include "content/common/content_export.h" |
24 #include "content/public/common/geoposition.h" | 24 #include "content/public/common/geoposition.h" |
25 | 25 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // The current best position estimate. | 118 // The current best position estimate. |
119 Geoposition position_; | 119 Geoposition position_; |
120 | 120 |
121 // Whether permission has been granted for the provider to operate. | 121 // Whether permission has been granted for the provider to operate. |
122 bool is_permission_granted_; | 122 bool is_permission_granted_; |
123 | 123 |
124 bool is_new_data_available_; | 124 bool is_new_data_available_; |
125 | 125 |
126 // The network location request object, and the url it uses. | 126 // The network location request object, and the url it uses. |
127 scoped_ptr<NetworkLocationRequest> request_; | 127 std::unique_ptr<NetworkLocationRequest> request_; |
128 | 128 |
129 // The cache of positions. | 129 // The cache of positions. |
130 scoped_ptr<PositionCache> position_cache_; | 130 std::unique_ptr<PositionCache> position_cache_; |
131 | 131 |
132 base::WeakPtrFactory<NetworkLocationProvider> weak_factory_; | 132 base::WeakPtrFactory<NetworkLocationProvider> weak_factory_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(NetworkLocationProvider); | 134 DISALLOW_COPY_AND_ASSIGN(NetworkLocationProvider); |
135 }; | 135 }; |
136 | 136 |
137 // Factory functions for the various types of location provider to abstract | 137 // Factory functions for the various types of location provider to abstract |
138 // over the platform-dependent implementations. | 138 // over the platform-dependent implementations. |
139 CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider( | 139 CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider( |
140 AccessTokenStore* access_token_store, | 140 AccessTokenStore* access_token_store, |
141 net::URLRequestContextGetter* context, | 141 net::URLRequestContextGetter* context, |
142 const GURL& url, | 142 const GURL& url, |
143 const base::string16& access_token); | 143 const base::string16& access_token); |
144 | 144 |
145 } // namespace content | 145 } // namespace content |
146 | 146 |
147 #endif // CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 147 #endif // CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
OLD | NEW |