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

Side by Side Diff: blimp/net/grpc_client_transport.cc

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Address gcasto comments Created 4 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 unified diff | Download patch
« no previous file with comments | « blimp/net/grpc_client_transport.h ('k') | blimp/net/grpc_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "blimp/net/grpc_client_transport.h"
6
7 #include <queue>
8 #include <string>
9 #include <utility>
10
11 #include "base/command_line.h"
12 #include "base/memory/ptr_util.h"
13 #include "base/synchronization/lock.h"
14 #include "base/threading/thread_task_runner_handle.h"
15 #include "blimp/common/logging.h"
16 #include "blimp/common/proto/blimp_message.pb.h"
17 #include "blimp/net/blimp_message_processor.h"
18 #include "blimp/net/blimp_message_pump.h"
19 #include "blimp/net/grpc_client_stream.h"
20 #include "blimp/net/grpc_connection.h"
21 #include "net/base/net_errors.h"
22
23 namespace blimp {
24
25 GrpcClientTransport::GrpcClientTransport(
26 const AssignmentOptions& assignment_options)
27 : BlimpTransport(), assignment_options_(assignment_options) {}
28
29 void GrpcClientTransport::Connect(const net::CompletionCallback& callback) {
30 grpc_connection_ = base::MakeUnique<GrpcConnection>(
31 base::MakeUnique<GrpcClientStream>(assignment_options_, callback));
32 }
33
34 std::unique_ptr<BlimpConnection> GrpcClientTransport::MakeConnection() {
35 DVLOG(1) << "Grpc Client finished setup";
36 return std::move(grpc_connection_);
37 }
38
39 const char* GrpcClientTransport::GetName() const {
40 return "GRPCClient";
41 }
42
43 GrpcClientTransport::~GrpcClientTransport() {}
44
45 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/grpc_client_transport.h ('k') | blimp/net/grpc_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698