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

Side by Side Diff: components/pairing/bluetooth_host_pairing_controller.cc

Issue 2901653002: Bootstrapping: Reboot on enrollment failure (Closed)
Patch Set: Fixed comments. Created 3 years, 7 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_host_pairing_controller.h" 5 #include "components/pairing/bluetooth_host_pairing_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 ChangeStage(STAGE_FINISHED); 433 ChangeStage(STAGE_FINISHED);
434 } 434 }
435 Reset(); 435 Reset();
436 } 436 }
437 437
438 void BluetoothHostPairingController::OnErrorMessage( 438 void BluetoothHostPairingController::OnErrorMessage(
439 const pairing_api::Error& message) { 439 const pairing_api::Error& message) {
440 NOTREACHED(); 440 NOTREACHED();
441 } 441 }
442 442
443 void BluetoothHostPairingController::OnRebootMessage(
444 const pairing_api::Reboot& message) {
445 DCHECK(thread_checker_.CalledOnValidThread());
446 for (Observer& observer : observers_)
447 observer.RebootHostRequested();
448 }
449
443 void BluetoothHostPairingController::OnAddNetworkMessage( 450 void BluetoothHostPairingController::OnAddNetworkMessage(
444 const pairing_api::AddNetwork& message) { 451 const pairing_api::AddNetwork& message) {
445 DCHECK(thread_checker_.CalledOnValidThread()); 452 DCHECK(thread_checker_.CalledOnValidThread());
446 for (Observer& observer : observers_) 453 for (Observer& observer : observers_)
447 observer.AddNetworkRequested(message.parameters().onc_spec()); 454 observer.AddNetworkRequested(message.parameters().onc_spec());
448 } 455 }
449 456
450 void BluetoothHostPairingController::AdapterPresentChanged( 457 void BluetoothHostPairingController::AdapterPresentChanged(
451 device::BluetoothAdapter* adapter, 458 device::BluetoothAdapter* adapter,
452 bool present) { 459 bool present) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); 584 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION);
578 } 585 }
579 586
580 void BluetoothHostPairingController::AuthorizePairing( 587 void BluetoothHostPairingController::AuthorizePairing(
581 device::BluetoothDevice* device) { 588 device::BluetoothDevice* device) {
582 // Disallow unknown device. 589 // Disallow unknown device.
583 device->RejectPairing(); 590 device->RejectPairing();
584 } 591 }
585 592
586 } // namespace pairing_chromeos 593 } // namespace pairing_chromeos
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_host_pairing_controller.h ('k') | components/pairing/host_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698