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

Side by Side Diff: device/bluetooth/test/bluetooth_test.cc

Issue 1341103004: Handle change of BLE address after pairing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ***ADDED BY MISTAKE, OMMIT *** Created 5 years, 2 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/test/bluetooth_test.h ('k') | device/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/bluetooth_test.h" 5 #include "device/bluetooth/test/bluetooth_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "device/bluetooth/bluetooth_adapter.h" 10 #include "device/bluetooth/bluetooth_adapter.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void BluetoothTestBase::Callback() { 49 void BluetoothTestBase::Callback() {
50 ++callback_count_; 50 ++callback_count_;
51 } 51 }
52 52
53 void BluetoothTestBase::DiscoverySessionCallback( 53 void BluetoothTestBase::DiscoverySessionCallback(
54 scoped_ptr<BluetoothDiscoverySession> discovery_session) { 54 scoped_ptr<BluetoothDiscoverySession> discovery_session) {
55 ++callback_count_; 55 ++callback_count_;
56 discovery_sessions_.push_back(discovery_session.release()); 56 discovery_sessions_.push_back(discovery_session.release());
57 } 57 }
58 58
59 void BluetoothTestBase::GattConnectionCallback( 59 void BluetoothTestBase::GattConnectionCallback() {
60 scoped_ptr<BluetoothGattConnection> connection) {
61 ++callback_count_; 60 ++callback_count_;
62 gatt_connections_.push_back(connection.release());
63 } 61 }
64 62
65 void BluetoothTestBase::ErrorCallback() { 63 void BluetoothTestBase::ErrorCallback() {
66 ++error_callback_count_; 64 ++error_callback_count_;
67 } 65 }
68 66
69 void BluetoothTestBase::ConnectErrorCallback( 67 void BluetoothTestBase::ConnectErrorCallback(
70 enum BluetoothDevice::ConnectErrorCode error_code) { 68 enum BluetoothDevice::ConnectErrorCode error_code) {
71 ++error_callback_count_; 69 ++error_callback_count_;
72 last_connect_error_code_ = error_code; 70 last_connect_error_code_ = error_code;
(...skipping 28 matching lines...) Expand all
101 99
102 void BluetoothTestBase::ResetEventCounts() { 100 void BluetoothTestBase::ResetEventCounts() {
103 last_connect_error_code_ = BluetoothDevice::ERROR_UNKNOWN; 101 last_connect_error_code_ = BluetoothDevice::ERROR_UNKNOWN;
104 callback_count_ = 0; 102 callback_count_ = 0;
105 error_callback_count_ = 0; 103 error_callback_count_ = 0;
106 gatt_connection_attempt_count_ = 0; 104 gatt_connection_attempt_count_ = 0;
107 gatt_disconnection_attempt_count_ = 0; 105 gatt_disconnection_attempt_count_ = 0;
108 } 106 }
109 107
110 } // namespace device 108 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698