summaryrefslogtreecommitdiffstats
path: root/components/pairing
diff options
context:
space:
mode:
authorachuith <achuith@chromium.org>2014-10-20 14:46:33 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-20 21:46:52 +0000
commit3750071cbf4aa647647dbf2d54c0f733b76255bd (patch)
tree8eaedcedbb433f687471df7a5e833ba4597eaefe /components/pairing
parent23e03f661a6326fd0bee4cb0ccc2c8a4cf331f7d (diff)
downloadchromium_src-3750071cbf4aa647647dbf2d54c0f733b76255bd.zip
chromium_src-3750071cbf4aa647647dbf2d54c0f733b76255bd.tar.gz
chromium_src-3750071cbf4aa647647dbf2d54c0f733b76255bd.tar.bz2
Replace STAGE_PAIRING_DONE with STAGE_HOST_ENROLLMENT_SUCCESS.
Handle STAGE_INITIALIZATION_ERROR with a logging message BUG=420111 TEST=manual Review URL: https://codereview.chromium.org/656503005 Cr-Commit-Position: refs/heads/master@{#300337}
Diffstat (limited to 'components/pairing')
-rw-r--r--components/pairing/bluetooth_controller_pairing_controller.cc4
-rw-r--r--components/pairing/bluetooth_host_pairing_controller.cc1
-rw-r--r--components/pairing/controller_pairing_controller.h4
-rw-r--r--components/pairing/fake_controller_pairing_controller.cc4
4 files changed, 6 insertions, 7 deletions
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index 0af8051..4e687ad 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -348,7 +348,7 @@ void BluetoothControllerPairingController::OnAuthenticationDone(
}
void BluetoothControllerPairingController::StartSession() {
- DCHECK_EQ(current_stage_, STAGE_PAIRING_DONE);
+ DCHECK_EQ(current_stage_, STAGE_HOST_ENROLLMENT_SUCCESS);
ChangeStage(STAGE_FINISHED);
}
@@ -385,7 +385,7 @@ void BluetoothControllerPairingController::CompleteSetup() {
ProtoDecoder::SendCompleteSetup(complete_setup, &size));
SendBuffer(io_buffer, size);
- ChangeStage(STAGE_PAIRING_DONE);
+ ChangeStage(STAGE_HOST_ENROLLMENT_SUCCESS);
}
void BluetoothControllerPairingController::OnConfigureHostMessage(
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc
index dc857c2..4f19510 100644
--- a/components/pairing/bluetooth_host_pairing_controller.cc
+++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -235,7 +235,6 @@ void BluetoothHostPairingController::OnAccept(
controller_socket_ = socket;
service_socket_ = NULL;
- // TODO: Update Host. (http://crbug.com/405754)
SendHostStatus();
controller_socket_->Receive(
diff --git a/components/pairing/controller_pairing_controller.h b/components/pairing/controller_pairing_controller.h
index d194292..6304c60 100644
--- a/components/pairing/controller_pairing_controller.h
+++ b/components/pairing/controller_pairing_controller.h
@@ -35,7 +35,7 @@ class ControllerPairingController {
STAGE_WAITING_FOR_CREDENTIALS,
STAGE_HOST_ENROLLMENT_IN_PROGRESS,
STAGE_HOST_ENROLLMENT_ERROR,
- STAGE_PAIRING_DONE,
+ STAGE_HOST_ENROLLMENT_SUCCESS,
STAGE_FINISHED
};
@@ -101,7 +101,7 @@ class ControllerPairingController {
const std::string& auth_token) = 0;
// Installs app and starts session.
- // Can be called only on |STAGE_PAIRING_DONE| stage.
+ // Can be called only on |STAGE_HOST_ENROLLMENT_SUCCESS| stage.
virtual void StartSession() = 0;
virtual void AddObserver(Observer* observer) = 0;
diff --git a/components/pairing/fake_controller_pairing_controller.cc b/components/pairing/fake_controller_pairing_controller.cc
index 6528061..0d30e06 100644
--- a/components/pairing/fake_controller_pairing_controller.cc
+++ b/components/pairing/fake_controller_pairing_controller.cc
@@ -219,7 +219,7 @@ void FakeControllerPairingController::OnAuthenticationDone(
}
void FakeControllerPairingController::StartSession() {
- CHECK(current_stage_ == STAGE_PAIRING_DONE);
+ CHECK(current_stage_ == STAGE_HOST_ENROLLMENT_SUCCESS);
ChangeStage(STAGE_FINISHED);
}
@@ -315,7 +315,7 @@ void FakeControllerPairingController::PairingStageChanged(Stage new_stage) {
enrollment_should_fail_ = false;
next_stage = STAGE_HOST_ENROLLMENT_ERROR;
} else {
- next_stage = STAGE_PAIRING_DONE;
+ next_stage = STAGE_HOST_ENROLLMENT_SUCCESS;
}
break;
}