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

Side by Side Diff: blimp/engine/feature/geolocation/engine_geolocation_feature.cc

Issue 2250433006: 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/engine/feature/geolocation/engine_geolocation_feature.h" 5 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 explicit BlimpGeolocationDelegate( 25 explicit BlimpGeolocationDelegate(
26 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate) { 26 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate) {
27 feature_delegate_ = feature_delegate; 27 feature_delegate_ = feature_delegate;
28 } 28 }
29 29
30 bool UseNetworkLocationProviders() final { return false; } 30 bool UseNetworkLocationProviders() final { return false; }
31 31
32 std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider() 32 std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider()
33 final { 33 final {
34 return base::WrapUnique(new BlimpLocationProvider(feature_delegate_)); 34 return base::MakeUnique<BlimpLocationProvider>(feature_delegate_);
35 } 35 }
36 36
37 private: 37 private:
38 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate_; 38 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate); 40 DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate);
41 }; 41 };
42 42
43 device::Geoposition::ErrorCode ConvertErrorCode( 43 device::Geoposition::ErrorCode ConvertErrorCode(
44 const GeolocationErrorMessage::ErrorCode& error_code) { 44 const GeolocationErrorMessage::ErrorCode& error_code) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 net::CompletionCallback()); 148 net::CompletionCallback());
149 } 149 }
150 150
151 void EngineGeolocationFeature::SetUpdateCallback( 151 void EngineGeolocationFeature::SetUpdateCallback(
152 const GeopositionReceivedCallback& callback) { 152 const GeopositionReceivedCallback& callback) {
153 geoposition_received_callback_ = callback; 153 geoposition_received_callback_ = callback;
154 } 154 }
155 155
156 } // namespace engine 156 } // namespace engine
157 } // namespace blimp 157 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/session/blimp_client_session.cc ('k') | blimp/engine/renderer/engine_image_serialization_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698