Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: device/geolocation/location_arbitrator_impl.cc

Issue 2254833003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/test/usb_test_gadget_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/test/usb_test_gadget_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698