| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void BluetoothAdapter::AddObserver(BluetoothAdapter::Observer* observer) { | 46 void BluetoothAdapter::AddObserver(BluetoothAdapter::Observer* observer) { |
| 47 DCHECK(observer); | 47 DCHECK(observer); |
| 48 observers_.AddObserver(observer); | 48 observers_.AddObserver(observer); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void BluetoothAdapter::RemoveObserver(BluetoothAdapter::Observer* observer) { | 51 void BluetoothAdapter::RemoveObserver(BluetoothAdapter::Observer* observer) { |
| 52 DCHECK(observer); | 52 DCHECK(observer); |
| 53 observers_.RemoveObserver(observer); | 53 observers_.RemoveObserver(observer); |
| 54 } | 54 } |
| 55 | 55 |
| 56 #if defined(OS_CHROMEOS) |
| 57 void BluetoothAdapter::SetDisabled(bool disabled) { |
| 58 NOTIMPLEMENTED(); |
| 59 } |
| 60 #endif |
| 61 |
| 56 void BluetoothAdapter::StartDiscoverySession( | 62 void BluetoothAdapter::StartDiscoverySession( |
| 57 const DiscoverySessionCallback& callback, | 63 const DiscoverySessionCallback& callback, |
| 58 const ErrorCallback& error_callback) { | 64 const ErrorCallback& error_callback) { |
| 59 StartDiscoverySessionWithFilter(nullptr, callback, error_callback); | 65 StartDiscoverySessionWithFilter(nullptr, callback, error_callback); |
| 60 } | 66 } |
| 61 | 67 |
| 62 void BluetoothAdapter::StartDiscoverySessionWithFilter( | 68 void BluetoothAdapter::StartDiscoverySessionWithFilter( |
| 63 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, | 69 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 64 const DiscoverySessionCallback& callback, | 70 const DiscoverySessionCallback& callback, |
| 65 const ErrorCallback& error_callback) { | 71 const ErrorCallback& error_callback) { |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 361 |
| 356 // static | 362 // static |
| 357 void BluetoothAdapter::RecordBluetoothDiscoverySessionStopOutcome( | 363 void BluetoothAdapter::RecordBluetoothDiscoverySessionStopOutcome( |
| 358 UMABluetoothDiscoverySessionOutcome outcome) { | 364 UMABluetoothDiscoverySessionOutcome outcome) { |
| 359 UMA_HISTOGRAM_ENUMERATION( | 365 UMA_HISTOGRAM_ENUMERATION( |
| 360 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome), | 366 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome), |
| 361 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT)); | 367 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT)); |
| 362 } | 368 } |
| 363 | 369 |
| 364 } // namespace device | 370 } // namespace device |
| OLD | NEW |