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 "device/geolocation/location_arbitrator_impl.h" | 5 #include "device/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 std::unique_ptr<LocationProvider> | 153 std::unique_ptr<LocationProvider> |
154 LocationArbitratorImpl::NewNetworkLocationProvider( | 154 LocationArbitratorImpl::NewNetworkLocationProvider( |
155 const scoped_refptr<AccessTokenStore>& access_token_store, | 155 const scoped_refptr<AccessTokenStore>& access_token_store, |
156 const scoped_refptr<net::URLRequestContextGetter>& context, | 156 const scoped_refptr<net::URLRequestContextGetter>& context, |
157 const GURL& url, | 157 const GURL& url, |
158 const base::string16& access_token) { | 158 const base::string16& access_token) { |
159 #if defined(OS_ANDROID) | 159 #if defined(OS_ANDROID) |
160 // Android uses its own SystemLocationProvider. | 160 // Android uses its own SystemLocationProvider. |
161 return nullptr; | 161 return nullptr; |
162 #else | 162 #else |
163 return base::WrapUnique(new NetworkLocationProvider( | 163 return base::MakeUnique<NetworkLocationProvider>(access_token_store, context, |
164 access_token_store, context, url, access_token)); | 164 url, access_token); |
165 #endif | 165 #endif |
166 } | 166 } |
167 | 167 |
168 std::unique_ptr<LocationProvider> | 168 std::unique_ptr<LocationProvider> |
169 LocationArbitratorImpl::NewSystemLocationProvider() { | 169 LocationArbitratorImpl::NewSystemLocationProvider() { |
170 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | 170 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
171 return nullptr; | 171 return nullptr; |
172 #else | 172 #else |
173 return device::NewSystemLocationProvider(); | 173 return device::NewSystemLocationProvider(); |
174 #endif | 174 #endif |
(...skipping 28 matching lines...) Expand all Loading... |
203 } | 203 } |
204 } | 204 } |
205 return false; | 205 return false; |
206 } | 206 } |
207 | 207 |
208 bool LocationArbitratorImpl::HasPermissionBeenGranted() const { | 208 bool LocationArbitratorImpl::HasPermissionBeenGranted() const { |
209 return is_permission_granted_; | 209 return is_permission_granted_; |
210 } | 210 } |
211 | 211 |
212 } // namespace device | 212 } // namespace device |
OLD | NEW |