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

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 2808353004: bluetooth: Rename Is*Available to Is*Supported (Closed)
Patch Set: Add const Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/arc/bluetooth/arc_bluetooth_bridge.h" 5 #include "components/arc/bluetooth/arc_bluetooth_bridge.h"
6 6
7 #include <bluetooth/bluetooth.h> 7 #include <bluetooth/bluetooth.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 callback.Run(status); 245 callback.Run(status);
246 } 246 }
247 247
248 } // namespace 248 } // namespace
249 249
250 namespace arc { 250 namespace arc {
251 251
252 ArcBluetoothBridge::ArcBluetoothBridge(ArcBridgeService* bridge_service) 252 ArcBluetoothBridge::ArcBluetoothBridge(ArcBridgeService* bridge_service)
253 : ArcService(bridge_service), binding_(this), weak_factory_(this) { 253 : ArcService(bridge_service), binding_(this), weak_factory_(this) {
254 if (BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) { 254 if (BluetoothAdapterFactory::IsBluetoothSupported()) {
255 VLOG(1) << "Registering bluetooth adapter."; 255 VLOG(1) << "Registering bluetooth adapter.";
256 BluetoothAdapterFactory::GetAdapter(base::Bind( 256 BluetoothAdapterFactory::GetAdapter(base::Bind(
257 &ArcBluetoothBridge::OnAdapterInitialized, weak_factory_.GetWeakPtr())); 257 &ArcBluetoothBridge::OnAdapterInitialized, weak_factory_.GetWeakPtr()));
258 } else { 258 } else {
259 VLOG(1) << "No bluetooth adapter available."; 259 VLOG(1) << "Bluetooth not supported.";
260 } 260 }
261 arc_bridge_service()->bluetooth()->AddObserver(this); 261 arc_bridge_service()->bluetooth()->AddObserver(this);
262 } 262 }
263 263
264 ArcBluetoothBridge::~ArcBluetoothBridge() { 264 ArcBluetoothBridge::~ArcBluetoothBridge() {
265 DCHECK(CalledOnValidThread()); 265 DCHECK(CalledOnValidThread());
266 266
267 arc_bridge_service()->bluetooth()->RemoveObserver(this); 267 arc_bridge_service()->bluetooth()->RemoveObserver(this);
268 268
269 if (bluetooth_adapter_) 269 if (bluetooth_adapter_)
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 sdp_bluetooth_instance->OnGetSdpRecords( 2164 sdp_bluetooth_instance->OnGetSdpRecords(
2165 status, std::move(remote_addr), target_uuid, 2165 status, std::move(remote_addr), target_uuid,
2166 std::vector<mojom::BluetoothSdpRecordPtr>()); 2166 std::vector<mojom::BluetoothSdpRecordPtr>());
2167 } 2167 }
2168 2168
2169 bool ArcBluetoothBridge::CalledOnValidThread() { 2169 bool ArcBluetoothBridge::CalledOnValidThread() {
2170 return thread_checker_.CalledOnValidThread(); 2170 return thread_checker_.CalledOnValidThread();
2171 } 2171 }
2172 2172
2173 } // namespace arc 2173 } // namespace arc
OLDNEW
« no previous file with comments | « chromeos/components/tether/initializer.cc ('k') | components/pairing/bluetooth_controller_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698