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

Unified Diff: device/bluetooth/test/mock_bluetooth_device.h

Issue 2196883002: bluetooth: Add optional 'name' support to MockBluetoothDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: device/bluetooth/test/mock_bluetooth_device.h
diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h
index e464ac20204dc3ba618c281779d85f402fa018cb..a7ed03ab37cecceb288d769fda128b199e88c0e1 100644
--- a/device/bluetooth/test/mock_bluetooth_device.h
+++ b/device/bluetooth/test/mock_bluetooth_device.h
@@ -11,6 +11,7 @@
#include <string>
#include "base/memory/scoped_vector.h"
+#include "base/optional.h"
#include "base/strings/string16.h"
#include "device/bluetooth/bluetooth_common.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -27,7 +28,7 @@ class MockBluetoothDevice : public BluetoothDevice {
public:
MockBluetoothDevice(MockBluetoothAdapter* adapter,
uint32_t bluetooth_class,
- const std::string& name,
+ const char* name,
const std::string& address,
bool paired,
bool connected);
@@ -117,7 +118,7 @@ class MockBluetoothDevice : public BluetoothDevice {
private:
uint32_t bluetooth_class_;
- std::string name_;
+ base::Optional<std::string> name_;
std::string address_;
BluetoothDevice::UUIDList uuids_;
bool connected_;

Powered by Google App Engine
This is Rietveld 408576698