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

Side by Side Diff: components/pairing/fake_host_pairing_controller.h

Issue 2890383003: Bootstrapping: Send meaningful error code/message from Slave to Master (Closed)
Patch Set: Address achuith@'s comments. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
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
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 SetErrorCodeAndMessage(int error_code,
53 const std::string& error_message) override;
52 void Reset() override; 54 void Reset() override;
53 55
54 // HostPairingController::Observer: 56 // HostPairingController::Observer:
55 void PairingStageChanged(Stage new_stage) override; 57 void PairingStageChanged(Stage new_stage) override;
56 58
57 base::ObserverList<Observer> observers_; 59 base::ObserverList<Observer> observers_;
58 Stage current_stage_; 60 Stage current_stage_;
59 std::string device_name_; 61 std::string device_name_;
60 std::string confirmation_code_; 62 std::string confirmation_code_;
61 base::TimeDelta async_duration_; 63 base::TimeDelta async_duration_;
62 64
63 // If this flag is true error happens on |STAGE_ENROLLING| once. 65 // If this flag is true error happens on |STAGE_ENROLLING| once.
64 bool enrollment_should_fail_; 66 bool enrollment_should_fail_;
65 67
66 // Controller starts its work like if update and reboot already happened. 68 // Controller starts its work like if update and reboot already happened.
67 bool start_after_update_; 69 bool start_after_update_;
68 70
69 std::string enrollment_domain_; 71 std::string enrollment_domain_;
70 72
71 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); 73 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController);
72 }; 74 };
73 75
74 } // namespace pairing_chromeos 76 } // namespace pairing_chromeos
75 77
76 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ 78 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_host_pairing_controller.cc ('k') | components/pairing/fake_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698