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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void RemoveObserver(Observer* observer) override; | 42 void RemoveObserver(Observer* observer) override; |
43 Stage GetCurrentStage() override; | 43 Stage GetCurrentStage() 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 OnNetworkConnectivityChanged(Connectivity connectivity_status) override; | 48 void OnNetworkConnectivityChanged(Connectivity connectivity_status) override; |
49 void OnUpdateStatusChanged(UpdateStatus update_status) override; | 49 void OnUpdateStatusChanged(UpdateStatus update_status) override; |
50 void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; | 50 void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; |
51 void SetPermanentId(const std::string& permanent_id) override; | 51 void SetPermanentId(const std::string& permanent_id) override; |
| 52 void Reset() override; |
52 | 53 |
53 // HostPairingController::Observer: | 54 // HostPairingController::Observer: |
54 void PairingStageChanged(Stage new_stage) override; | 55 void PairingStageChanged(Stage new_stage) override; |
55 | 56 |
56 base::ObserverList<Observer> observers_; | 57 base::ObserverList<Observer> observers_; |
57 Stage current_stage_; | 58 Stage current_stage_; |
58 std::string device_name_; | 59 std::string device_name_; |
59 std::string confirmation_code_; | 60 std::string confirmation_code_; |
60 base::TimeDelta async_duration_; | 61 base::TimeDelta async_duration_; |
61 | 62 |
62 // If this flag is true error happens on |STAGE_ENROLLING| once. | 63 // If this flag is true error happens on |STAGE_ENROLLING| once. |
63 bool enrollment_should_fail_; | 64 bool enrollment_should_fail_; |
64 | 65 |
65 // Controller starts its work like if update and reboot already happened. | 66 // Controller starts its work like if update and reboot already happened. |
66 bool start_after_update_; | 67 bool start_after_update_; |
67 | 68 |
68 std::string enrollment_domain_; | 69 std::string enrollment_domain_; |
69 | 70 |
70 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); | 71 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); |
71 }; | 72 }; |
72 | 73 |
73 } // namespace pairing_chromeos | 74 } // namespace pairing_chromeos |
74 | 75 |
75 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ | 76 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ |
OLD | NEW |