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

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

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mock_bluetooth_device.h" 5 #include "device/bluetooth/test/mock_bluetooth_device.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "device/bluetooth/bluetooth_gatt_service.h" 8 #include "device/bluetooth/bluetooth_gatt_service.h"
9 #include "device/bluetooth/test/mock_bluetooth_adapter.h" 9 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter, 13 MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
14 uint32 bluetooth_class, 14 uint32_t bluetooth_class,
15 const std::string& name, 15 const std::string& name,
16 const std::string& address, 16 const std::string& address,
17 bool paired, 17 bool paired,
18 bool connected) 18 bool connected)
19 : BluetoothDevice(adapter), 19 : BluetoothDevice(adapter),
20 bluetooth_class_(bluetooth_class), 20 bluetooth_class_(bluetooth_class),
21 name_(name), 21 name_(name),
22 address_(address) { 22 address_(address) {
23 ON_CALL(*this, GetBluetoothClass()) 23 ON_CALL(*this, GetBluetoothClass())
24 .WillByDefault(testing::Return(bluetooth_class_)); 24 .WillByDefault(testing::Return(bluetooth_class_));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 BluetoothGattService* MockBluetoothDevice::GetMockService( 77 BluetoothGattService* MockBluetoothDevice::GetMockService(
78 const std::string& identifier) const { 78 const std::string& identifier) const {
79 for (BluetoothGattService* service : mock_services_) { 79 for (BluetoothGattService* service : mock_services_) {
80 if (service->GetIdentifier() == identifier) 80 if (service->GetIdentifier() == identifier)
81 return service; 81 return service;
82 } 82 }
83 return nullptr; 83 return nullptr;
84 } 84 }
85 85
86 } // namespace device 86 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.h ('k') | device/bluetooth/test/mock_bluetooth_discovery_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698