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

Side by Side Diff: blimp/net/engine_authentication_handler.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
« no previous file with comments | « blimp/net/delta_encoding_unittest.cc ('k') | blimp/net/engine_authentication_handler.cc » ('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 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_ENGINE_AUTHENTICATION_HANDLER_H_
6 #define BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_
7
8 #include <memory>
9 #include <string>
10 #include <vector>
11
12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h"
14 #include "blimp/net/blimp_net_export.h"
15 #include "blimp/net/connection_handler.h"
16
17 namespace blimp {
18
19 class BlimpConnection;
20
21 // Authenticates connections and passes successfully authenticated connections
22 // to |connection_handler|.
23 class BLIMP_NET_EXPORT EngineAuthenticationHandler : public ConnectionHandler {
24 public:
25 // |client_auth_token|: used to authenticate incoming connection.
26 // |connection_handler|: a new connection is passed on to it after the
27 // connection is authenticate this handler.
28 EngineAuthenticationHandler(ConnectionHandler* connection_handler,
29 const std::string& client_auth_token);
30
31 ~EngineAuthenticationHandler() override;
32
33 // ConnectionHandler implementation.
34 void HandleConnection(std::unique_ptr<BlimpConnection> connection) override;
35
36 private:
37 // Used to abandon pending authenticated connections if |this| is deleted.
38 base::WeakPtrFactory<ConnectionHandler> connection_handler_weak_factory_;
39
40 // Used to authenticate incoming connection. Engine is assigned to one client
41 // only, and all connections from that client shall carry the same token.
42 const std::string client_auth_token_;
43
44 DISALLOW_COPY_AND_ASSIGN(EngineAuthenticationHandler);
45 };
46
47 } // namespace blimp
48
49 #endif // BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_
OLDNEW
« no previous file with comments | « blimp/net/delta_encoding_unittest.cc ('k') | blimp/net/engine_authentication_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698