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

Unified Diff: components/pairing/fake_host_pairing_controller.cc

Issue 491943004: Update the pairing API to include configuration and enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/pairing/fake_host_pairing_controller.h ('k') | components/pairing/host_pairing_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pairing/fake_host_pairing_controller.cc
diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc
index b2af9b0234d5291bbbebd28d1e56161eecb44303..80c00c89b86573a832a442981dec8a6aeda66bbf 100644
--- a/components/pairing/fake_host_pairing_controller.cc
+++ b/components/pairing/fake_host_pairing_controller.cc
@@ -16,7 +16,6 @@
namespace {
-const int kUpdateStepsNumber = 10;
const int kDefaultAsyncDurationMs = 3000;
const size_t kCodeLength = 6;
@@ -91,24 +90,6 @@ void FakeHostPairingController::ChangeStageLater(Stage new_stage) {
async_duration_);
}
-void FakeHostPairingController::SetUpdateProgress(int step) {
- UpdateProgress progress;
- progress.progress = double(step) / kUpdateStepsNumber;
- FOR_EACH_OBSERVER(Observer, observers_, UpdateAdvanced(progress));
- base::Closure task;
- if (step >= kUpdateStepsNumber) {
- task = base::Bind(&FakeHostPairingController::ChangeStage,
- base::Unretained(this),
- STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE);
- } else {
- task = base::Bind(&FakeHostPairingController::SetUpdateProgress,
- base::Unretained(this),
- step + 1);
- }
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, task, async_duration_ / kUpdateStepsNumber);
-}
-
void FakeHostPairingController::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}
@@ -143,6 +124,10 @@ std::string FakeHostPairingController::GetEnrollmentDomain() {
return enrollment_domain_;
}
+void FakeHostPairingController::OnUpdateStatusChanged(
+ UpdateStatus update_status) {
+}
+
void FakeHostPairingController::PairingStageChanged(Stage new_stage) {
switch (new_stage) {
case STAGE_WAITING_FOR_CONTROLLER: {
@@ -154,7 +139,7 @@ void FakeHostPairingController::PairingStageChanged(Stage new_stage) {
break;
}
case STAGE_UPDATING: {
- SetUpdateProgress(0);
+ ChangeStageLater(STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE);
break;
}
case STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE: {
@@ -186,7 +171,15 @@ void FakeHostPairingController::PairingStageChanged(Stage new_stage) {
}
}
-void FakeHostPairingController::UpdateAdvanced(const UpdateProgress& progress) {
+void FakeHostPairingController::ConfigureHost(
+ bool accepted_eula,
+ const std::string& lang,
+ const std::string& timezone,
+ bool send_reports,
+ const std::string& keyboard_layout) {
+}
+
+void FakeHostPairingController::EnrollHost(const std::string& auth_token) {
}
} // namespace pairing_chromeos
« no previous file with comments | « components/pairing/fake_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