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

Side by Side Diff: components/pairing/bluetooth_controller_pairing_controller.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 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 "components/pairing/bluetooth_controller_pairing_controller.h" 5 #include "components/pairing/bluetooth_controller_pairing_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 BluetoothControllerPairingController::GetCurrentStage() { 234 BluetoothControllerPairingController::GetCurrentStage() {
235 return current_stage_; 235 return current_stage_;
236 } 236 }
237 237
238 void BluetoothControllerPairingController::StartPairing() { 238 void BluetoothControllerPairingController::StartPairing() {
239 DCHECK(thread_checker_.CalledOnValidThread()); 239 DCHECK(thread_checker_.CalledOnValidThread());
240 DCHECK(current_stage_ == STAGE_NONE || 240 DCHECK(current_stage_ == STAGE_NONE ||
241 current_stage_ == STAGE_DEVICE_NOT_FOUND || 241 current_stage_ == STAGE_DEVICE_NOT_FOUND ||
242 current_stage_ == STAGE_ESTABLISHING_CONNECTION_ERROR || 242 current_stage_ == STAGE_ESTABLISHING_CONNECTION_ERROR ||
243 current_stage_ == STAGE_HOST_ENROLLMENT_ERROR); 243 current_stage_ == STAGE_HOST_ENROLLMENT_ERROR);
244 if (!device::BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) { 244 if (!device::BluetoothAdapterFactory::IsBluetoothSupported()) {
245 ChangeStage(STAGE_INITIALIZATION_ERROR); 245 ChangeStage(STAGE_INITIALIZATION_ERROR);
246 return; 246 return;
247 } 247 }
248 248
249 device::BluetoothAdapterFactory::GetAdapter( 249 device::BluetoothAdapterFactory::GetAdapter(
250 base::Bind(&BluetoothControllerPairingController::OnGetAdapter, 250 base::Bind(&BluetoothControllerPairingController::OnGetAdapter,
251 ptr_factory_.GetWeakPtr())); 251 ptr_factory_.GetWeakPtr()));
252 252
253 } 253 }
254 254
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); 500 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION);
501 } 501 }
502 502
503 void BluetoothControllerPairingController::AuthorizePairing( 503 void BluetoothControllerPairingController::AuthorizePairing(
504 device::BluetoothDevice* device) { 504 device::BluetoothDevice* device) {
505 // Disallow unknown device. 505 // Disallow unknown device.
506 device->RejectPairing(); 506 device->RejectPairing();
507 } 507 }
508 508
509 } // namespace pairing_chromeos 509 } // namespace pairing_chromeos
OLDNEW
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.cc ('k') | components/pairing/bluetooth_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698