Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_CLIENT_AUTH_HANDLER_H_ | |
| 6 #define BLIMP_NET_CLIENT_AUTH_HANDLER_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/timer/timer.h" | |
| 13 #include "blimp/net/blimp_net_export.h" | |
| 14 #include "blimp/net/connection_handler.h" | |
| 15 | |
| 16 namespace blimp { | |
| 17 | |
| 18 class BlimpConnection; | |
| 19 class BlimpMessage; | |
| 20 | |
| 21 // Sends authenticate message to the engine and hand connections over to | |
| 22 // |connection_handler| right away. | |
| 23 class BLIMP_NET_EXPORT ClientAuthHandler : public ConnectionHandler { | |
|
Wez
2015/12/04 01:40:28
See comments re EngineAuthHandler naming.
Based o
| |
| 24 public: | |
| 25 // Caller is responsible for ensuring that |connection_handler| outlives | |
| 26 // |this|. | |
| 27 explicit ClientAuthHandler(ConnectionHandler* connection_handler); | |
| 28 | |
| 29 ~ClientAuthHandler() override; | |
| 30 | |
| 31 // ConnectionHandler implementation. | |
| 32 void HandleConnection(scoped_ptr<BlimpConnection> connection) override; | |
| 33 | |
| 34 private: | |
| 35 // Gathers client token and checkpoints and creates a blimp message to | |
| 36 // send to the engine. | |
| 37 scoped_ptr<BlimpMessage> CreateAuthMessage(); | |
| 38 | |
| 39 ConnectionHandler* connection_handler_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(ClientAuthHandler); | |
| 42 }; | |
| 43 | |
| 44 } // namespace blimp | |
| 45 | |
| 46 #endif // BLIMP_NET_CLIENT_AUTH_HANDLER_H_ | |
| OLD | NEW |