| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_discovery_session.h" | 5 #include "device/bluetooth/bluetooth_discovery_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "device/bluetooth/bluetooth_adapter.h" | 8 #include "device/bluetooth/bluetooth_adapter.h" |
| 9 #include "device/bluetooth/bluetooth_discovery_filter.h" | 9 #include "device/bluetooth/bluetooth_discovery_filter.h" |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 void BluetoothDiscoverySession::SetDiscoveryFilter( | 96 void BluetoothDiscoverySession::SetDiscoveryFilter( |
| 97 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, | 97 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 98 const base::Closure& callback, | 98 const base::Closure& callback, |
| 99 const ErrorCallback& error_callback) { | 99 const ErrorCallback& error_callback) { |
| 100 discovery_filter_.reset(discovery_filter.release()); | 100 discovery_filter_.reset(discovery_filter.release()); |
| 101 // BluetoothDiscoverySession::SetDiscoveryFilter is only used from a private | 101 // BluetoothDiscoverySession::SetDiscoveryFilter is only used from a private |
| 102 // extension API, so we don't bother histogramming its failures. | 102 // extension API, so we don't bother histogramming its failures. |
| 103 adapter_->SetDiscoveryFilter( | 103 adapter_->SetDiscoveryFilter( |
| 104 adapter_->GetMergedDiscoveryFilter().Pass(), callback, | 104 adapter_->GetMergedDiscoveryFilter(), callback, |
| 105 base::Bind(&IgnoreDiscoveryOutcome, error_callback)); | 105 base::Bind(&IgnoreDiscoveryOutcome, error_callback)); |
| 106 } | 106 } |
| 107 | 107 |
| 108 const BluetoothDiscoveryFilter* BluetoothDiscoverySession::GetDiscoveryFilter() | 108 const BluetoothDiscoveryFilter* BluetoothDiscoverySession::GetDiscoveryFilter() |
| 109 const { | 109 const { |
| 110 return discovery_filter_.get(); | 110 return discovery_filter_.get(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace device | 113 } // namespace device |
| OLD | NEW |