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

Unified Diff: components/pairing/host_pairing_controller.h

Issue 2890383003: Bootstrapping: Send meaningful error code/message from Slave to Master (Closed)
Patch Set: . Created 3 years, 7 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
Index: components/pairing/host_pairing_controller.h
diff --git a/components/pairing/host_pairing_controller.h b/components/pairing/host_pairing_controller.h
index 869f1e9fa4a36704790a5d69acc11d143d5a6497..7330ad377da035aa27514ef010d469df5c54725a 100644
--- a/components/pairing/host_pairing_controller.h
+++ b/components/pairing/host_pairing_controller.h
@@ -51,6 +51,14 @@ class HostPairingController {
ENROLLMENT_STATUS_SUCCESS,
};
+ enum ErrorCode {
achuithb 2017/05/25 19:25:54 We now prefer enum class.
xdai1 2017/06/08 22:18:41 Done. I'll update the other enums in another CL to
+ ERROR_NONE = 0,
+ NETWORK_ERROR,
+ AUTH_ERROR,
+ ENROLL_ERROR,
+ OTHER_ERROR,
+ };
+
class Observer {
public:
Observer();
@@ -111,6 +119,9 @@ class HostPairingController {
// Set the permanent id assigned during enrollment.
virtual void SetPermanentId(const std::string& permanent_id) = 0;
+ virtual void SetErrorCodeAndMessage(int error_code,
+ const std::string& error_message) = 0;
+
// Reset the controller.
virtual void Reset() = 0;

Powered by Google App Engine
This is Rietveld 408576698