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

Side by Side Diff: components/arc/test/fake_bluetooth_instance.cc

Issue 2214263006: arc: bluetooth: Fix LSAN error in fake_bluetooth_instance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add #include <memory> for unique_ptr 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 | « components/arc/test/fake_bluetooth_instance.h ('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 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 "components/arc/test/fake_bluetooth_instance.h" 5 #include "components/arc/test/fake_bluetooth_instance.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace arc { 9 namespace arc {
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 void FakeBluetoothInstance::OnAclStateChanged( 53 void FakeBluetoothInstance::OnAclStateChanged(
54 mojom::BluetoothStatus status, 54 mojom::BluetoothStatus status,
55 mojom::BluetoothAddressPtr remote_addr, 55 mojom::BluetoothAddressPtr remote_addr,
56 mojom::BluetoothAclState state) {} 56 mojom::BluetoothAclState state) {}
57 57
58 void FakeBluetoothInstance::OnLEDeviceFound( 58 void FakeBluetoothInstance::OnLEDeviceFound(
59 mojom::BluetoothAddressPtr addr, 59 mojom::BluetoothAddressPtr addr,
60 int32_t rssi, 60 int32_t rssi,
61 mojo::Array<mojom::BluetoothAdvertisingDataPtr> adv_data) { 61 mojo::Array<mojom::BluetoothAdvertisingDataPtr> adv_data) {
62 le_device_found_data_.push_back( 62 le_device_found_data_.push_back(base::MakeUnique<LEDeviceFoundData>(
63 new LEDeviceFoundData(std::move(addr), rssi, std::move(adv_data))); 63 std::move(addr), rssi, std::move(adv_data)));
64 } 64 }
65 65
66 void FakeBluetoothInstance::OnLEConnectionStateChange( 66 void FakeBluetoothInstance::OnLEConnectionStateChange(
67 mojom::BluetoothAddressPtr remote_addr, 67 mojom::BluetoothAddressPtr remote_addr,
68 bool connected) {} 68 bool connected) {}
69 69
70 void FakeBluetoothInstance::OnSearchComplete( 70 void FakeBluetoothInstance::OnSearchComplete(
71 mojom::BluetoothAddressPtr remote_addr, 71 mojom::BluetoothAddressPtr remote_addr,
72 mojom::BluetoothGattStatus status) {} 72 mojom::BluetoothGattStatus status) {}
73 73
74 void FakeBluetoothInstance::OnGetGattDB( 74 void FakeBluetoothInstance::OnGetGattDB(
75 mojom::BluetoothAddressPtr remote_addr, 75 mojom::BluetoothAddressPtr remote_addr,
76 mojo::Array<mojom::BluetoothGattDBElementPtr> db) { 76 mojo::Array<mojom::BluetoothGattDBElementPtr> db) {
77 gatt_db_result_.push_back( 77 gatt_db_result_.push_back(
78 new GattDBResult(std::move(remote_addr), std::move(db))); 78 base::MakeUnique<GattDBResult>(std::move(remote_addr), std::move(db)));
79 } 79 }
80 80
81 void FakeBluetoothInstance::OnServicesRemoved( 81 void FakeBluetoothInstance::OnServicesRemoved(
82 mojom::BluetoothAddressPtr remote_addr, 82 mojom::BluetoothAddressPtr remote_addr,
83 uint16_t start_handle, 83 uint16_t start_handle,
84 uint16_t end_handle) {} 84 uint16_t end_handle) {}
85 85
86 void FakeBluetoothInstance::OnServicesAdded( 86 void FakeBluetoothInstance::OnServicesAdded(
87 mojom::BluetoothAddressPtr remote_addr, 87 mojom::BluetoothAddressPtr remote_addr,
88 mojo::Array<mojom::BluetoothGattDBElementPtr> db) {} 88 mojo::Array<mojom::BluetoothGattDBElementPtr> db) {}
(...skipping 13 matching lines...) Expand all
102 const RequestGattReadCallback& callback) {} 102 const RequestGattReadCallback& callback) {}
103 103
104 void FakeBluetoothInstance::RequestGattWrite( 104 void FakeBluetoothInstance::RequestGattWrite(
105 mojom::BluetoothAddressPtr address, 105 mojom::BluetoothAddressPtr address,
106 int32_t attribute_handle, 106 int32_t attribute_handle,
107 int32_t offset, 107 int32_t offset,
108 mojo::Array<uint8_t> value, 108 mojo::Array<uint8_t> value,
109 const RequestGattWriteCallback& callback) {} 109 const RequestGattWriteCallback& callback) {}
110 110
111 } // namespace arc 111 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/test/fake_bluetooth_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698