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

Unified Diff: chromeos/components/tether/message_wrapper.cc

Issue 2913363002: [CrOS Tether] Add KeepAliveTickleResponse messages to both the proto file and MessageWrapper. (Closed)
Patch Set: Rebased. 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: chromeos/components/tether/message_wrapper.cc
diff --git a/chromeos/components/tether/message_wrapper.cc b/chromeos/components/tether/message_wrapper.cc
index 9a167010edbbc3e08ac07021098b124d3f00f317..a4f1248034af768b2b0b646f2a7114d81f696f5e 100644
--- a/chromeos/components/tether/message_wrapper.cc
+++ b/chromeos/components/tether/message_wrapper.cc
@@ -47,6 +47,12 @@ std::unique_ptr<google::protobuf::MessageLite> DecodedMessageToProto(
keep_alive_tickle->ParseFromString(decoded_message);
return std::move(keep_alive_tickle);
}
+ case MessageType::KEEP_ALIVE_TICKLE_RESPONSE: {
+ std::unique_ptr<KeepAliveTickleResponse> keep_alive_tickle_response =
+ base::MakeUnique<KeepAliveTickleResponse>();
+ keep_alive_tickle_response->ParseFromString(decoded_message);
+ return std::move(keep_alive_tickle_response);
+ }
case MessageType::TETHER_AVAILABILITY_REQUEST: {
std::unique_ptr<TetherAvailabilityRequest> tether_request =
base::MakeUnique<TetherAvailabilityRequest>();
@@ -123,6 +129,10 @@ MessageWrapper::MessageWrapper(const KeepAliveTickle& tickle)
: type_(MessageType::KEEP_ALIVE_TICKLE),
proto_(new KeepAliveTickle(tickle)) {}
+MessageWrapper::MessageWrapper(const KeepAliveTickleResponse& response)
+ : type_(MessageType::KEEP_ALIVE_TICKLE_RESPONSE),
+ proto_(new KeepAliveTickleResponse(response)) {}
+
MessageWrapper::MessageWrapper(const TetherAvailabilityRequest& request)
: type_(MessageType::TETHER_AVAILABILITY_REQUEST),
proto_(new TetherAvailabilityRequest(request)) {}
« no previous file with comments | « chromeos/components/tether/message_wrapper.h ('k') | chromeos/components/tether/message_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698