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

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

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted BluetoothDevice interface. Created 7 years, 9 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 (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_adapter.h" 5 #include "device/bluetooth/bluetooth_adapter.h"
6 6
7 #include "base/stl_util.h"
7 #include "device/bluetooth/bluetooth_device.h" 8 #include "device/bluetooth/bluetooth_device.h"
8 9
9 namespace device { 10 namespace device {
10 11
11 BluetoothAdapter::BluetoothAdapter() { 12 BluetoothAdapter::BluetoothAdapter() {
12 } 13 }
13 14
14 BluetoothAdapter::~BluetoothAdapter() { 15 BluetoothAdapter::~BluetoothAdapter() {
16 STLDeleteValues(&devices_);
15 } 17 }
16 18
17 const std::string& BluetoothAdapter::address() const { 19 const std::string& BluetoothAdapter::address() const {
18 return address_; 20 return address_;
19 } 21 }
20 22
21 const std::string& BluetoothAdapter::name() const { 23 const std::string& BluetoothAdapter::name() const {
22 return name_; 24 return name_;
23 } 25 }
24 26
(...skipping 27 matching lines...) Expand all
52 const BluetoothDevice* BluetoothAdapter::GetDevice( 54 const BluetoothDevice* BluetoothAdapter::GetDevice(
53 const std::string& address) const { 55 const std::string& address) const {
54 DevicesMap::const_iterator iter = devices_.find(address); 56 DevicesMap::const_iterator iter = devices_.find(address);
55 if (iter != devices_.end()) 57 if (iter != devices_.end())
56 return iter->second; 58 return iter->second;
57 59
58 return NULL; 60 return NULL;
59 } 61 }
60 62
61 } // namespace device 63 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_chromeos.cc » ('j') | device/bluetooth/bluetooth_device_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698