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

Side by Side Diff: device/geolocation/geolocation_provider_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, 3 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/bluetooth/test/bluetooth_test.cc ('k') | device/geolocation/location_arbitrator_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/geolocation_provider_impl.h" 5 #include "device/geolocation/geolocation_provider_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 std::unique_ptr<LocationArbitrator> 186 std::unique_ptr<LocationArbitrator>
187 GeolocationProviderImpl::CreateArbitrator() { 187 GeolocationProviderImpl::CreateArbitrator() {
188 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( 188 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind(
189 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); 189 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this));
190 // Use the embedder's |g_delegate| or fall back to the default one. 190 // Use the embedder's |g_delegate| or fall back to the default one.
191 if (!g_delegate.Get()) 191 if (!g_delegate.Get())
192 g_delegate.Get().reset(new GeolocationDelegate); 192 g_delegate.Get().reset(new GeolocationDelegate);
193 193
194 return base::WrapUnique( 194 return base::MakeUnique<LocationArbitratorImpl>(callback,
195 new LocationArbitratorImpl(callback, g_delegate.Get().get())); 195 g_delegate.Get().get());
196 } 196 }
197 197
198 } // namespace device 198 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test.cc ('k') | device/geolocation/location_arbitrator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698