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

Side by Side Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 2567903004: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map (Closed)
Patch Set: Mac bustage Created 3 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/bluetooth_adapter.h" 5 #include "device/bluetooth/bluetooth_adapter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const AdvertisementErrorCallback& error_callback) override {} 107 const AdvertisementErrorCallback& error_callback) override {}
108 #endif 108 #endif
109 109
110 BluetoothLocalGattService* GetGattService( 110 BluetoothLocalGattService* GetGattService(
111 const std::string& identifier) const override { 111 const std::string& identifier) const override {
112 return nullptr; 112 return nullptr;
113 } 113 }
114 114
115 void TestErrorCallback() {} 115 void TestErrorCallback() {}
116 116
117 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; 117 std::vector<std::unique_ptr<BluetoothDiscoverySession>> discovery_sessions_;
118 118
119 void TestOnStartDiscoverySession( 119 void TestOnStartDiscoverySession(
120 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) { 120 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) {
121 discovery_sessions_.push_back(std::move(discovery_session)); 121 discovery_sessions_.push_back(std::move(discovery_session));
122 } 122 }
123 123
124 void CleanupSessions() { discovery_sessions_.clear(); } 124 void CleanupSessions() { discovery_sessions_.clear(); }
125 125
126 void InjectFilteredSession( 126 void InjectFilteredSession(
127 std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter) { 127 std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter) {
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 } 1044 }
1045 EXPECT_EQ(BluetoothDevice::UUIDSet({heart_service_uuid}), 1045 EXPECT_EQ(BluetoothDevice::UUIDSet({heart_service_uuid}),
1046 RetrieveConnectedPeripheralServiceUUIDs()); 1046 RetrieveConnectedPeripheralServiceUUIDs());
1047 1047
1048 EXPECT_EQ(0, observer.device_added_count()); 1048 EXPECT_EQ(0, observer.device_added_count());
1049 EXPECT_EQ(1u, adapter_->GetDevices().size()); 1049 EXPECT_EQ(1u, adapter_->GetDevices().size());
1050 } 1050 }
1051 #endif // defined(OS_MACOSX) 1051 #endif // defined(OS_MACOSX)
1052 1052
1053 } // namespace device 1053 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698