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

Side by Side Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.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 | « device/bluetooth/bluetooth_discovery_session.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bluez/bluetooth_adapter_bluez.h" 5 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 } 1452 }
1453 1453
1454 // If old and new filter are not null and equal then don't make request, just 1454 // If old and new filter are not null and equal then don't make request, just
1455 // call succes callback 1455 // call succes callback
1456 if (current_filter_ && discovery_filter && 1456 if (current_filter_ && discovery_filter &&
1457 current_filter_->Equals(*discovery_filter)) { 1457 current_filter_->Equals(*discovery_filter)) {
1458 callback.Run(); 1458 callback.Run();
1459 return; 1459 return;
1460 } 1460 }
1461 1461
1462 current_filter_.reset(discovery_filter.release()); 1462 current_filter_ = std::move(discovery_filter);
1463 1463
1464 bluez::BluetoothAdapterClient::DiscoveryFilter dbus_discovery_filter; 1464 bluez::BluetoothAdapterClient::DiscoveryFilter dbus_discovery_filter;
1465 1465
1466 if (current_filter_.get()) { 1466 if (current_filter_.get()) {
1467 uint16_t pathloss; 1467 uint16_t pathloss;
1468 int16_t rssi; 1468 int16_t rssi;
1469 uint8_t transport; 1469 uint8_t transport;
1470 std::set<device::BluetoothUUID> uuids; 1470 std::set<device::BluetoothUUID> uuids;
1471 1471
1472 if (current_filter_->GetPathloss(&pathloss)) 1472 if (current_filter_->GetPathloss(&pathloss))
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 } else if (error_name == bluetooth_adapter::kErrorAlreadyExists) { 1741 } else if (error_name == bluetooth_adapter::kErrorAlreadyExists) {
1742 code = BluetoothServiceRecordBlueZ::ErrorCode::ERROR_RECORD_ALREADY_EXISTS; 1742 code = BluetoothServiceRecordBlueZ::ErrorCode::ERROR_RECORD_ALREADY_EXISTS;
1743 } else if (error_name == bluetooth_adapter::kErrorNotReady) { 1743 } else if (error_name == bluetooth_adapter::kErrorNotReady) {
1744 code = BluetoothServiceRecordBlueZ::ErrorCode::ERROR_ADAPTER_NOT_READY; 1744 code = BluetoothServiceRecordBlueZ::ErrorCode::ERROR_ADAPTER_NOT_READY;
1745 } 1745 }
1746 1746
1747 error_callback.Run(code); 1747 error_callback.Run(code);
1748 } 1748 }
1749 1749
1750 } // namespace bluez 1750 } // namespace bluez
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_discovery_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698