| 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 #ifndef COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ | 5 #ifndef COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ |
| 6 #define COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ | 6 #define COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // empty, random code is generated. | 27 // empty, random code is generated. |
| 28 // * device_name - string. Default: "Chromebox-01". | 28 // * device_name - string. Default: "Chromebox-01". |
| 29 // * domain - string. Default: "example.com". | 29 // * domain - string. Default: "example.com". |
| 30 explicit FakeHostPairingController(const std::string& config); | 30 explicit FakeHostPairingController(const std::string& config); |
| 31 ~FakeHostPairingController() override; | 31 ~FakeHostPairingController() override; |
| 32 | 32 |
| 33 // Applies given |config| to flow. | 33 // Applies given |config| to flow. |
| 34 void ApplyConfig(const std::string& config); | 34 void ApplyConfig(const std::string& config); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 void ChangeStage(Stage new_stage); | |
| 38 void ChangeStageLater(Stage new_stage); | 37 void ChangeStageLater(Stage new_stage); |
| 39 | 38 |
| 40 // HostPairingController: | 39 // HostPairingController: |
| 41 void AddObserver(Observer* observer) override; | 40 void AddObserver(Observer* observer) override; |
| 42 void RemoveObserver(Observer* observer) override; | 41 void RemoveObserver(Observer* observer) override; |
| 43 Stage GetCurrentStage() override; | 42 Stage GetCurrentStage() override; |
| 43 void ChangeStage(Stage new_stage) override; |
| 44 void StartPairing() override; | 44 void StartPairing() override; |
| 45 std::string GetDeviceName() override; | 45 std::string GetDeviceName() override; |
| 46 std::string GetConfirmationCode() override; | 46 std::string GetConfirmationCode() override; |
| 47 std::string GetEnrollmentDomain() override; | 47 std::string GetEnrollmentDomain() override; |
| 48 void OnUpdateStatusChanged(UpdateStatus update_status) override; | 48 void OnUpdateStatusChanged(UpdateStatus update_status) override; |
| 49 void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; | 49 void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; |
| 50 void SetPermanentId(const std::string& permanent_id) override; | 50 void SetPermanentId(const std::string& permanent_id) override; |
| 51 | 51 |
| 52 // HostPairingController::Observer: | 52 // HostPairingController::Observer: |
| 53 void PairingStageChanged(Stage new_stage) override; | 53 void PairingStageChanged(Stage new_stage) override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 65 bool start_after_update_; | 65 bool start_after_update_; |
| 66 | 66 |
| 67 std::string enrollment_domain_; | 67 std::string enrollment_domain_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); | 69 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace pairing_chromeos | 72 } // namespace pairing_chromeos |
| 73 | 73 |
| 74 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ | 74 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ |
| OLD | NEW |