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

Side by Side Diff: blimp/net/blimp_transport.h

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef BLIMP_NET_BLIMP_TRANSPORT_H_
6 #define BLIMP_NET_BLIMP_TRANSPORT_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "net/base/completion_callback.h"
12
13 namespace blimp {
14
15 class BlimpConnection;
16
17 // An interface which encapsulates the transport-specific code for
18 // establishing network connections between the client and engine.
19 // Subclasses of BlimpTransport are responsible for defining their own
20 // methods for receiving connection arguments.
21 class BlimpTransport {
22 public:
23 virtual ~BlimpTransport() {}
24
25 // Initiate or listen for a connection.
26 //
27 // |callback| is passed net::OK if a connection was successfully
28 // established.
29 // All other values indicate a connection error.
30 virtual void Connect(const net::CompletionCallback& callback) = 0;
31
32 // Creates a new |BlimpConnection| for the specific |BlimpTransport|
33 // implementation. Must not be called until |Connect|'s callback returns
34 // net::OK.
35 virtual std::unique_ptr<BlimpConnection> MakeConnection() = 0;
36
37 // Gets the transport name, e.g. "TCP", "SSL", "mock", etc.
38 virtual const char* GetName() const = 0;
39 };
40
41 } // namespace blimp
42
43 #endif // BLIMP_NET_BLIMP_TRANSPORT_H_
OLDNEW
« no previous file with comments | « blimp/net/blimp_stats_unittest.cc ('k') | blimp/net/blob_channel/blob_channel_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698