[Remoting][FTL] Extend GrpcAsyncDispatcher to support server stream RPC

This CL extends GrpcAsyncDispatcher so that it can handle server stream
RPC. It also changes the grpc::Status param in unary call callback to
const ref because grpc::Status contains string field and might be
expensive to copy.

Bug: 927962
Change-Id: Ide85df5fc25933f3e81fd8ed89d043a65d5eefa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504834
Commit-Queue: Yuwei Huang <[email protected]>
Reviewed-by: Joe Downing <[email protected]>
Cr-Commit-Position: refs/heads/master@{#639154}
diff --git a/remoting/test/ftl_signaling_playground.cc b/remoting/test/ftl_signaling_playground.cc
index 6ed29616..fb119f0 100644
--- a/remoting/test/ftl_signaling_playground.cc
+++ b/remoting/test/ftl_signaling_playground.cc
@@ -215,7 +215,7 @@
 
 void FtlSignalingPlayground::OnGetIceServerResponse(
     base::OnceClosure on_done,
-    grpc::Status status,
+    const grpc::Status& status,
     const ftl::GetICEServerResponse& response) {
   if (status.ok()) {
     printf("Ice transport policy: %s\n",
@@ -261,7 +261,7 @@
 
 void FtlSignalingPlayground::OnSignInGaiaResponse(
     base::OnceClosure on_done,
-    grpc::Status status,
+    const grpc::Status& status,
     const ftl::SignInGaiaResponse& response) {
   if (status.ok()) {
     // TODO(yuweih): Allow loading auth token directly from command line.
@@ -293,7 +293,7 @@
 
 void FtlSignalingPlayground::OnPullMessagesResponse(
     base::OnceClosure on_done,
-    grpc::Status status,
+    const grpc::Status& status,
     const ftl::PullMessagesResponse& response) {
   if (!status.ok()) {
     if (status.error_code() == grpc::StatusCode::UNAUTHENTICATED) {
@@ -352,7 +352,7 @@
 
 void FtlSignalingPlayground::OnAckMessagesResponse(
     base::OnceClosure on_done,
-    grpc::Status status,
+    const grpc::Status& status,
     const ftl::AckMessagesResponse& response) {
   if (status.ok()) {
     VLOG(0) << "Messages acked";