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

Side by Side Diff: device/bluetooth/bluetooth_discovery_session.cc

Issue 2729333002: Replace unique_ptr.reset(other_unique_ptr.release() with std::move() in device/bluetooth/ (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | device/bluetooth/bluez/bluetooth_adapter_bluez.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/bluetooth/bluetooth_discovery_session.h" 5 #include "device/bluetooth/bluetooth_discovery_session.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "device/bluetooth/bluetooth_adapter.h" 10 #include "device/bluetooth/bluetooth_adapter.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 static void IgnoreDiscoveryOutcome( 92 static void IgnoreDiscoveryOutcome(
93 const base::Closure& error_callback, 93 const base::Closure& error_callback,
94 UMABluetoothDiscoverySessionOutcome outcome) { 94 UMABluetoothDiscoverySessionOutcome outcome) {
95 error_callback.Run(); 95 error_callback.Run();
96 } 96 }
97 97
98 void BluetoothDiscoverySession::SetDiscoveryFilter( 98 void BluetoothDiscoverySession::SetDiscoveryFilter(
99 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, 99 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter,
100 const base::Closure& callback, 100 const base::Closure& callback,
101 const ErrorCallback& error_callback) { 101 const ErrorCallback& error_callback) {
102 discovery_filter_.reset(discovery_filter.release()); 102 discovery_filter_ = std::move(discovery_filter);
103 // BluetoothDiscoverySession::SetDiscoveryFilter is only used from a private 103 // BluetoothDiscoverySession::SetDiscoveryFilter is only used from a private
104 // extension API, so we don't bother histogramming its failures. 104 // extension API, so we don't bother histogramming its failures.
105 adapter_->SetDiscoveryFilter( 105 adapter_->SetDiscoveryFilter(
106 adapter_->GetMergedDiscoveryFilter(), callback, 106 adapter_->GetMergedDiscoveryFilter(), callback,
107 base::Bind(&IgnoreDiscoveryOutcome, error_callback)); 107 base::Bind(&IgnoreDiscoveryOutcome, error_callback));
108 } 108 }
109 109
110 const BluetoothDiscoveryFilter* BluetoothDiscoverySession::GetDiscoveryFilter() 110 const BluetoothDiscoveryFilter* BluetoothDiscoverySession::GetDiscoveryFilter()
111 const { 111 const {
112 return discovery_filter_.get(); 112 return discovery_filter_.get();
113 } 113 }
114 114
115 } // namespace device 115 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698