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

Unified Diff: components/pairing/proto_decoder.cc

Issue 1428353002: Network Setup from Shark to Remora. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address achuithb@'s comment. Created 5 years, 1 month 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/proto_decoder.cc
diff --git a/components/pairing/proto_decoder.cc b/components/pairing/proto_decoder.cc
index f8e42a4bd4d14861c16d90b2cac7c7a1059597ed..52853d30cb9113958e588d9bfad82f05b109989f 100644
--- a/components/pairing/proto_decoder.cc
+++ b/components/pairing/proto_decoder.cc
@@ -128,19 +128,27 @@ bool ProtoDecoder::DecodeIOBuffer(int size,
ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendHostStatus(
const pairing_api::HostStatus& message, int* size) {
std::string serialized_proto;
- if (!message.SerializeToString(&serialized_proto)) {
+ if (!message.SerializeToString(&serialized_proto))
NOTREACHED();
- }
return SendMessage(MESSAGE_HOST_STATUS, serialized_proto, size);
}
+ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendHostNetwork(
+ const pairing_api::AddNetwork& message,
+ int* size) {
+ std::string serialized_proto;
+ if (!message.SerializeToString(&serialized_proto))
+ NOTREACHED();
+
+ return SendMessage(MESSAGE_ADD_NETWORK, serialized_proto, size);
+}
+
ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendConfigureHost(
const pairing_api::ConfigureHost& message, int* size) {
std::string serialized_proto;
- if (!message.SerializeToString(&serialized_proto)) {
+ if (!message.SerializeToString(&serialized_proto))
NOTREACHED();
- }
return SendMessage(MESSAGE_CONFIGURE_HOST, serialized_proto, size);
}
@@ -148,9 +156,8 @@ ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendConfigureHost(
ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendPairDevices(
const pairing_api::PairDevices& message, int* size) {
std::string serialized_proto;
- if (!message.SerializeToString(&serialized_proto)) {
+ if (!message.SerializeToString(&serialized_proto))
NOTREACHED();
- }
return SendMessage(MESSAGE_PAIR_DEVICES, serialized_proto, size);
}
@@ -158,9 +165,8 @@ ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendPairDevices(
ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendCompleteSetup(
const pairing_api::CompleteSetup& message, int* size) {
std::string serialized_proto;
- if (!message.SerializeToString(&serialized_proto)) {
+ if (!message.SerializeToString(&serialized_proto))
NOTREACHED();
- }
return SendMessage(MESSAGE_COMPLETE_SETUP, serialized_proto, size);
}
@@ -168,9 +174,8 @@ ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendCompleteSetup(
ProtoDecoder::IOBufferRefPtr ProtoDecoder::SendError(
const pairing_api::Error& message, int* size) {
std::string serialized_proto;
- if (!message.SerializeToString(&serialized_proto)) {
+ if (!message.SerializeToString(&serialized_proto))
NOTREACHED();
- }
return SendMessage(MESSAGE_ERROR, serialized_proto, size);
}
« chrome/browser/chromeos/login/screens/network_screen.cc ('K') | « components/pairing/proto_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698