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

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

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the format type to unsigned long. 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_win.h" 5 #include "device/bluetooth/bluetooth_adapter_win.h"
6 6
7 #include <hash_set> 7 #include <hash_set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 16 matching lines...) Expand all
27 scanning_(false), 27 scanning_(false),
28 num_discovery_listeners_(0), 28 num_discovery_listeners_(0),
29 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { 29 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
30 } 30 }
31 31
32 BluetoothAdapterWin::~BluetoothAdapterWin() { 32 BluetoothAdapterWin::~BluetoothAdapterWin() {
33 if (task_manager_) { 33 if (task_manager_) {
34 task_manager_->RemoveObserver(this); 34 task_manager_->RemoveObserver(this);
35 task_manager_->Shutdown(); 35 task_manager_->Shutdown();
36 } 36 }
37 STLDeleteValues(&devices_);
38 } 37 }
39 38
40 void BluetoothAdapterWin::AddObserver(BluetoothAdapter::Observer* observer) { 39 void BluetoothAdapterWin::AddObserver(BluetoothAdapter::Observer* observer) {
41 DCHECK(observer); 40 DCHECK(observer);
42 observers_.AddObserver(observer); 41 observers_.AddObserver(observer);
43 } 42 }
44 43
45 void BluetoothAdapterWin::RemoveObserver(BluetoothAdapter::Observer* observer) { 44 void BluetoothAdapterWin::RemoveObserver(BluetoothAdapter::Observer* observer) {
46 DCHECK(observer); 45 DCHECK(observer);
47 observers_.RemoveObserver(observer); 46 observers_.RemoveObserver(observer);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); 275 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size();
277 on_stop_discovery_callbacks_.clear(); 276 on_stop_discovery_callbacks_.clear();
278 return; 277 return;
279 } 278 }
280 279
281 discovery_status_ = DISCOVERY_STOPPING; 280 discovery_status_ = DISCOVERY_STOPPING;
282 task_manager_->PostStopDiscoveryTask(); 281 task_manager_->PostStopDiscoveryTask();
283 } 282 }
284 283
285 } // namespace device 284 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698