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

Unified Diff: components/arc/test/fake_bluetooth_instance.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/arc/test/fake_bluetooth_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_bluetooth_instance.h
diff --git a/components/arc/test/fake_bluetooth_instance.h b/components/arc/test/fake_bluetooth_instance.h
index 336d0b2ccc92f2dab7316c0a156e5ad720b0e5ef..d4a5756dc1a9b05563aecee542dce9370c52489e 100644
--- a/components/arc/test/fake_bluetooth_instance.h
+++ b/components/arc/test/fake_bluetooth_instance.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_
#define COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_
+#include <memory>
#include <vector>
#include "base/macros.h"
@@ -122,18 +123,19 @@ class FakeBluetoothInstance : public mojom::BluetoothInstance {
return device_found_data_;
}
- const std::vector<LEDeviceFoundData*>& le_device_found_data() const {
+ const std::vector<std::unique_ptr<LEDeviceFoundData>>& le_device_found_data()
+ const {
return le_device_found_data_;
}
- const std::vector<GattDBResult*>& gatt_db_result() const {
+ const std::vector<std::unique_ptr<GattDBResult>>& gatt_db_result() const {
return gatt_db_result_;
}
private:
std::vector<mojo::Array<mojom::BluetoothPropertyPtr>> device_found_data_;
- std::vector<LEDeviceFoundData*> le_device_found_data_;
- std::vector<GattDBResult*> gatt_db_result_;
+ std::vector<std::unique_ptr<LEDeviceFoundData>> le_device_found_data_;
+ std::vector<std::unique_ptr<GattDBResult>> gatt_db_result_;
DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInstance);
};
« no previous file with comments | « no previous file | components/arc/test/fake_bluetooth_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698