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

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

Issue 397123002: Cleanup: Drop some unnecessary params from the BluetoothSocketNet constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up Windows as well Created 6 years, 5 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void BluetoothDeviceWin::Forget(const ErrorCallback& error_callback) { 196 void BluetoothDeviceWin::Forget(const ErrorCallback& error_callback) {
197 NOTIMPLEMENTED(); 197 NOTIMPLEMENTED();
198 } 198 }
199 199
200 void BluetoothDeviceWin::ConnectToService( 200 void BluetoothDeviceWin::ConnectToService(
201 const BluetoothUUID& uuid, 201 const BluetoothUUID& uuid,
202 const ConnectToServiceCallback& callback, 202 const ConnectToServiceCallback& callback,
203 const ConnectToServiceErrorCallback& error_callback) { 203 const ConnectToServiceErrorCallback& error_callback) {
204 scoped_refptr<BluetoothSocketWin> socket( 204 scoped_refptr<BluetoothSocketWin> socket(
205 BluetoothSocketWin::CreateBluetoothSocket( 205 BluetoothSocketWin::CreateBluetoothSocket(
206 ui_task_runner_, socket_thread_, NULL, net::NetLog::Source())); 206 ui_task_runner_, socket_thread_));
207 socket->Connect(this, uuid, base::Bind(callback, socket), error_callback); 207 socket->Connect(this, uuid, base::Bind(callback, socket), error_callback);
208 } 208 }
209 209
210 void BluetoothDeviceWin::CreateGattConnection( 210 void BluetoothDeviceWin::CreateGattConnection(
211 const GattConnectionCallback& callback, 211 const GattConnectionCallback& callback,
212 const ConnectErrorCallback& error_callback) { 212 const ConnectErrorCallback& error_callback) {
213 // TODO(armansito): Implement. 213 // TODO(armansito): Implement.
214 error_callback.Run(ERROR_UNSUPPORTED_DEVICE); 214 error_callback.Run(ERROR_UNSUPPORTED_DEVICE);
215 } 215 }
216 216
217 void BluetoothDeviceWin::StartConnectionMonitor( 217 void BluetoothDeviceWin::StartConnectionMonitor(
218 const base::Closure& callback, 218 const base::Closure& callback,
219 const ErrorCallback& error_callback) { 219 const ErrorCallback& error_callback) {
220 NOTIMPLEMENTED(); 220 NOTIMPLEMENTED();
221 } 221 }
222 222
223 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord( 223 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord(
224 const device::BluetoothUUID& uuid) const { 224 const device::BluetoothUUID& uuid) const {
225 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 225 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
226 iter != service_record_list_.end(); 226 iter != service_record_list_.end();
227 ++iter) { 227 ++iter) {
228 if ((*iter)->uuid() == uuid) 228 if ((*iter)->uuid() == uuid)
229 return *iter; 229 return *iter;
230 } 230 }
231 return NULL; 231 return NULL;
232 } 232 }
233 233
234 } // namespace device 234 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698