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

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

Issue 224893002: device/bluetooth: Rename device::bluetooth_utils::UUID to device::BluetoothUUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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/bluetooth_device_win.h" 5 #include "device/bluetooth/bluetooth_device_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const base::Closure& callback, 154 const base::Closure& callback,
155 const ErrorCallback& error_callback) { 155 const ErrorCallback& error_callback) {
156 NOTIMPLEMENTED(); 156 NOTIMPLEMENTED();
157 } 157 }
158 158
159 void BluetoothDeviceWin::Forget(const ErrorCallback& error_callback) { 159 void BluetoothDeviceWin::Forget(const ErrorCallback& error_callback) {
160 NOTIMPLEMENTED(); 160 NOTIMPLEMENTED();
161 } 161 }
162 162
163 void BluetoothDeviceWin::ConnectToService( 163 void BluetoothDeviceWin::ConnectToService(
164 const std::string& service_uuid, 164 const device::BluetoothUUID& service_uuid,
165 const SocketCallback& callback) { 165 const SocketCallback& callback) {
166 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 166 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
167 iter != service_record_list_.end(); 167 iter != service_record_list_.end();
168 ++iter) { 168 ++iter) {
169 if ((*iter)->uuid() == service_uuid) { 169 if ((*iter)->uuid() == service_uuid) {
170 // If multiple service records are found, use the first one that works. 170 // If multiple service records are found, use the first one that works.
171 scoped_refptr<BluetoothSocket> socket( 171 scoped_refptr<BluetoothSocket> socket(
172 BluetoothSocketWin::CreateBluetoothSocket(**iter)); 172 BluetoothSocketWin::CreateBluetoothSocket(**iter));
173 if (socket.get() != NULL) { 173 if (socket.get() != NULL) {
174 callback.Run(socket); 174 callback.Run(socket);
(...skipping 20 matching lines...) Expand all
195 NOTIMPLEMENTED(); 195 NOTIMPLEMENTED();
196 } 196 }
197 197
198 void BluetoothDeviceWin::ClearOutOfBandPairingData( 198 void BluetoothDeviceWin::ClearOutOfBandPairingData(
199 const base::Closure& callback, 199 const base::Closure& callback,
200 const ErrorCallback& error_callback) { 200 const ErrorCallback& error_callback) {
201 NOTIMPLEMENTED(); 201 NOTIMPLEMENTED();
202 } 202 }
203 203
204 const BluetoothServiceRecord* BluetoothDeviceWin::GetServiceRecord( 204 const BluetoothServiceRecord* BluetoothDeviceWin::GetServiceRecord(
205 const std::string& uuid) const { 205 const device::BluetoothUUID& uuid) const {
206 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 206 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
207 iter != service_record_list_.end(); 207 iter != service_record_list_.end();
208 ++iter) { 208 ++iter) {
209 if ((*iter)->uuid().compare(uuid) == 0) 209 if ((*iter)->uuid() == uuid)
210 return *iter; 210 return *iter;
211 } 211 }
212 return NULL; 212 return NULL;
213 } 213 }
214 214
215 } // namespace device 215 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win.h ('k') | device/bluetooth/bluetooth_device_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698