OLD | NEW |
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/fake_controller_pairing_controller.h" | 5 #include "components/pairing/fake_controller_pairing_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 void FakeControllerPairingController::SetConfirmationCodeIsCorrect( | 199 void FakeControllerPairingController::SetConfirmationCodeIsCorrect( |
200 bool correct) { | 200 bool correct) { |
201 CHECK(current_stage_ == STAGE_WAITING_FOR_CODE_CONFIRMATION); | 201 CHECK(current_stage_ == STAGE_WAITING_FOR_CODE_CONFIRMATION); |
202 if (correct) | 202 if (correct) |
203 ChangeStage(STAGE_HOST_UPDATE_IN_PROGRESS); | 203 ChangeStage(STAGE_HOST_UPDATE_IN_PROGRESS); |
204 else | 204 else |
205 ChangeStage(STAGE_DEVICES_DISCOVERY); | 205 ChangeStage(STAGE_DEVICES_DISCOVERY); |
206 } | 206 } |
207 | 207 |
| 208 void FakeControllerPairingController::SetHostConfiguration( |
| 209 bool accepted_eula, |
| 210 const std::string& lang, |
| 211 const std::string& timezone, |
| 212 bool send_reports, |
| 213 const std::string& keyboard_layout) { |
| 214 } |
| 215 |
208 void FakeControllerPairingController::OnAuthenticationDone( | 216 void FakeControllerPairingController::OnAuthenticationDone( |
209 const chromeos::UserContext& user_context, | 217 const std::string& domain, |
210 content::BrowserContext* browser_context) { | 218 const std::string& auth_token) { |
211 CHECK(current_stage_ == STAGE_WAITING_FOR_CREDENTIALS); | 219 CHECK(current_stage_ == STAGE_WAITING_FOR_CREDENTIALS); |
212 ChangeStage(STAGE_HOST_ENROLLMENT_IN_PROGRESS); | 220 ChangeStage(STAGE_HOST_ENROLLMENT_IN_PROGRESS); |
213 } | 221 } |
214 | 222 |
215 void FakeControllerPairingController::StartSession() { | 223 void FakeControllerPairingController::StartSession() { |
216 CHECK(current_stage_ == STAGE_PAIRING_DONE); | 224 CHECK(current_stage_ == STAGE_PAIRING_DONE); |
217 ChangeStage(STAGE_FINISHED); | 225 ChangeStage(STAGE_FINISHED); |
218 } | 226 } |
219 | 227 |
220 void FakeControllerPairingController::ChangeStage(Stage new_stage) { | 228 void FakeControllerPairingController::ChangeStage(Stage new_stage) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 next_stage = STAGE_HOST_CONNECTION_LOST; | 334 next_stage = STAGE_HOST_CONNECTION_LOST; |
327 } | 335 } |
328 if (next_stage != STAGE_NONE) | 336 if (next_stage != STAGE_NONE) |
329 ChangeStageLater(next_stage); | 337 ChangeStageLater(next_stage); |
330 } | 338 } |
331 | 339 |
332 void FakeControllerPairingController::DiscoveredDevicesListChanged() { | 340 void FakeControllerPairingController::DiscoveredDevicesListChanged() { |
333 } | 341 } |
334 | 342 |
335 } // namespace pairing_chromeos | 343 } // namespace pairing_chromeos |
OLD | NEW |