Chromium Code Reviews| 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_factory.h" | 5 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 // static | 100 // static |
| 101 void BluetoothAdapterFactory::SetAdapterForTesting( | 101 void BluetoothAdapterFactory::SetAdapterForTesting( |
| 102 scoped_refptr<BluetoothAdapter> adapter) { | 102 scoped_refptr<BluetoothAdapter> adapter) { |
| 103 default_adapter.Get() = adapter->GetWeakPtrForTesting(); | 103 default_adapter.Get() = adapter->GetWeakPtrForTesting(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // static | 106 // static |
| 107 bool BluetoothAdapterFactory::HasSharedInstanceForTesting() { | 107 bool BluetoothAdapterFactory::HasSharedInstanceForTesting() { |
| 108 return default_adapter.Get(); | 108 return !!default_adapter.Get(); |
|
Nico
2016/06/02 21:31:02
.
| |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace device | 111 } // namespace device |
| OLD | NEW |