summaryrefslogtreecommitdiffstats
path: root/components/pairing
diff options
context:
space:
mode:
authorachuith <achuith@chromium.org>2014-10-22 14:03:00 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-22 21:04:32 +0000
commit7067bb173d25501b7a04d3e5bb00f5aaabbd4c6f (patch)
tree4f23af95fd61466e9fa851a2afe422c373c186f3 /components/pairing
parent7b38f8b35666252d764525802443bd62b23bad5e (diff)
downloadchromium_src-7067bb173d25501b7a04d3e5bb00f5aaabbd4c6f.zip
chromium_src-7067bb173d25501b7a04d3e5bb00f5aaabbd4c6f.tar.gz
chromium_src-7067bb173d25501b7a04d3e5bb00f5aaabbd4c6f.tar.bz2
Support for host configuration.
* Introduce STAGE_PAIRING_DONE, which is when we initiate host configuration from the pairing screen. * Get rid of STAGE_UPDATING. Instead exit the host_pairing_screen in ConfigureHost. * Add ConfigureHost and SetConfigureHost to ScreenObserver. * NetworkScreenActor now handles setting and getting of locale, language, and keyboard_layout. * Move MarkEulaAccepted to the right place. BUG=417690 TEST=manual Review URL: https://codereview.chromium.org/668663005 Cr-Commit-Position: refs/heads/master@{#300754}
Diffstat (limited to 'components/pairing')
-rw-r--r--components/pairing/bluetooth_controller_pairing_controller.cc4
-rw-r--r--components/pairing/bluetooth_host_pairing_controller.cc2
-rw-r--r--components/pairing/controller_pairing_controller.h1
-rw-r--r--components/pairing/fake_host_pairing_controller.cc4
-rw-r--r--components/pairing/host_pairing_controller.h2
5 files changed, 5 insertions, 8 deletions
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index 4e687ad..56c34db 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -163,6 +163,7 @@ void BluetoothControllerPairingController::OnConnectToService(
ptr_factory_.GetWeakPtr()),
base::Bind(&BluetoothControllerPairingController::OnReceiveError,
ptr_factory_.GetWeakPtr()));
+ ChangeStage(STAGE_PAIRING_DONE);
}
void BluetoothControllerPairingController::OnSendComplete(int bytes_sent) {}
@@ -314,6 +315,9 @@ void BluetoothControllerPairingController::SetHostConfiguration(
const std::string& timezone,
bool send_reports,
const std::string& keyboard_layout) {
+ VLOG(1) << "SetHostConfiguration lang=" << lang
+ << ", timezone=" << timezone
+ << ", keyboard_layout=" << keyboard_layout;
pairing_api::ConfigureHost host_config;
host_config.set_api_version(kPairingAPIVersion);
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc
index 4f19510..072b494 100644
--- a/components/pairing/bluetooth_host_pairing_controller.cc
+++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -243,8 +243,6 @@ void BluetoothHostPairingController::OnAccept(
ptr_factory_.GetWeakPtr()),
base::Bind(&BluetoothHostPairingController::OnReceiveError,
ptr_factory_.GetWeakPtr()));
-
- ChangeStage(STAGE_UPDATING);
}
void BluetoothHostPairingController::OnSetDiscoverable(bool change_stage) {
diff --git a/components/pairing/controller_pairing_controller.h b/components/pairing/controller_pairing_controller.h
index 6304c60..60b17a9 100644
--- a/components/pairing/controller_pairing_controller.h
+++ b/components/pairing/controller_pairing_controller.h
@@ -30,6 +30,7 @@ class ControllerPairingController {
STAGE_ESTABLISHING_CONNECTION,
STAGE_ESTABLISHING_CONNECTION_ERROR,
STAGE_WAITING_FOR_CODE_CONFIRMATION,
+ STAGE_PAIRING_DONE,
STAGE_HOST_UPDATE_IN_PROGRESS,
STAGE_HOST_CONNECTION_LOST,
STAGE_WAITING_FOR_CREDENTIALS,
diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc
index 9ebf1b6..12798e4 100644
--- a/components/pairing/fake_host_pairing_controller.cc
+++ b/components/pairing/fake_host_pairing_controller.cc
@@ -139,10 +139,6 @@ void FakeHostPairingController::PairingStageChanged(Stage new_stage) {
break;
}
case STAGE_WAITING_FOR_CODE_CONFIRMATION: {
- ChangeStageLater(STAGE_UPDATING);
- break;
- }
- case STAGE_UPDATING: {
ChangeStageLater(STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE);
break;
}
diff --git a/components/pairing/host_pairing_controller.h b/components/pairing/host_pairing_controller.h
index 7be8f59..7d79c4f 100644
--- a/components/pairing/host_pairing_controller.h
+++ b/components/pairing/host_pairing_controller.h
@@ -18,7 +18,6 @@ class HostPairingController {
STAGE_INITIALIZATION_ERROR,
STAGE_WAITING_FOR_CONTROLLER,
STAGE_WAITING_FOR_CODE_CONFIRMATION,
- STAGE_UPDATING,
STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE,
STAGE_WAITING_FOR_CREDENTIALS,
STAGE_ENROLLING,
@@ -84,7 +83,6 @@ class HostPairingController {
virtual std::string GetEnrollmentDomain() = 0;
// Notify that the update status has changed.
- // Can be called on stage |STAGE_UPDATING|.
virtual void OnUpdateStatusChanged(UpdateStatus update_status) = 0;
// Notify that enrollment status has changed.