| Index: device/bluetooth/test/bluetooth_test.cc
|
| diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc
|
| index faeb71f0e3e0dcb412d6232710477dfa38bb8190..ee36dbac05a9adf2d96d322219796acc7a6f29fb 100644
|
| --- a/device/bluetooth/test/bluetooth_test.cc
|
| +++ b/device/bluetooth/test/bluetooth_test.cc
|
| @@ -141,6 +141,25 @@ void BluetoothTestBase::NotifyCallback(
|
| unexpected_success_callback_ = true;
|
| }
|
|
|
| +void BluetoothTestBase::StopNotifyCallback(
|
| + Call expected,
|
| + BluetoothGattNotifySession* notify_session) {
|
| + ++callback_count_;
|
| + for (ScopedVector<BluetoothGattNotifySession>::iterator i =
|
| + notify_sessions_.begin();
|
| + i != notify_sessions_.end(); ++i) {
|
| + if (*i == notify_session) {
|
| + notify_sessions_.erase(i);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + if (expected == Call::EXPECTED)
|
| + ++actual_success_callback_calls_;
|
| + else
|
| + unexpected_success_callback_ = true;
|
| +}
|
| +
|
| void BluetoothTestBase::ReadValueCallback(Call expected,
|
| const std::vector<uint8_t>& value) {
|
| ++callback_count_;
|
| @@ -257,6 +276,15 @@ BluetoothTestBase::GetNotifyCallback(Call expected) {
|
| weak_factory_.GetWeakPtr(), expected);
|
| }
|
|
|
| +base::Closure BluetoothTestBase::GetStopNotifyCallback(
|
| + Call expected,
|
| + BluetoothGattNotifySession* notify_session) {
|
| + if (expected == Call::EXPECTED)
|
| + ++expected_success_callback_calls_;
|
| + return base::Bind(&BluetoothTestBase::StopNotifyCallback,
|
| + weak_factory_.GetWeakPtr(), expected, notify_session);
|
| +}
|
| +
|
| BluetoothRemoteGattCharacteristic::ValueCallback
|
| BluetoothTestBase::GetReadValueCallback(Call expected) {
|
| if (expected == Call::EXPECTED)
|
|
|