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

Unified Diff: components/cryptauth/wire_message.h

Issue 2849493002: [EasyUnlock] Fixing the setup connection finder and message format. (Closed)
Patch Set: date Created 3 years, 8 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/cryptauth/wire_message.h
diff --git a/components/cryptauth/wire_message.h b/components/cryptauth/wire_message.h
index 2ab1db9a17968935546d09e97a04c4ea5ce4b3d0..5aed96d970ce5c653c6a8d58cf01c68520b91fae 100644
--- a/components/cryptauth/wire_message.h
+++ b/components/cryptauth/wire_message.h
@@ -16,6 +16,11 @@ class WireMessage {
public:
// Creates a WireMessage containing |payload| for feature |feature|.
explicit WireMessage(const std::string& payload, const std::string& feature);
+
+ // Creates a WireMessage containing |body| (a serialized JSON) as the message
+ // body.
+ explicit WireMessage(const std::string& body);
+
virtual ~WireMessage();
// Returns the deserialized message from |serialized_message|, or nullptr if
@@ -32,6 +37,7 @@ class WireMessage {
const std::string& payload() const { return payload_; }
const std::string& feature() const { return feature_; }
+ const std::string& body() const { return body_; }
private:
// The message payload.
@@ -41,6 +47,10 @@ class WireMessage {
// EasyUnlock).
const std::string feature_;
+ // The message body. When this is set |payload_| and |feature_| are empty, and
+ // vice-versa.
+ const std::string body_;
+
DISALLOW_COPY_AND_ASSIGN(WireMessage);
};

Powered by Google App Engine
This is Rietveld 408576698