Chromium Code Reviews| Index: blimp/net/client_auth_handler.h |
| diff --git a/blimp/net/client_auth_handler.h b/blimp/net/client_auth_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..05a1afc14f837cfb55754e8ca12780f8ae78a7c4 |
| --- /dev/null |
| +++ b/blimp/net/client_auth_handler.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_NET_CLIENT_AUTH_HANDLER_H_ |
| +#define BLIMP_NET_CLIENT_AUTH_HANDLER_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/timer/timer.h" |
| +#include "blimp/net/blimp_net_export.h" |
| +#include "blimp/net/connection_handler.h" |
| + |
| +namespace blimp { |
| + |
| +class BlimpConnection; |
| +class BlimpMessage; |
| + |
| +// Sends authenticate message to the engine and hand connections over to |
| +// |connection_handler| right away. |
| +class BLIMP_NET_EXPORT ClientAuthHandler : public ConnectionHandler { |
|
Wez
2015/12/04 01:40:28
See comments re EngineAuthHandler naming.
Based o
|
| + public: |
| + // Caller is responsible for ensuring that |connection_handler| outlives |
| + // |this|. |
| + explicit ClientAuthHandler(ConnectionHandler* connection_handler); |
| + |
| + ~ClientAuthHandler() override; |
| + |
| + // ConnectionHandler implementation. |
| + void HandleConnection(scoped_ptr<BlimpConnection> connection) override; |
| + |
| + private: |
| + // Gathers client token and checkpoints and creates a blimp message to |
| + // send to the engine. |
| + scoped_ptr<BlimpMessage> CreateAuthMessage(); |
| + |
| + ConnectionHandler* connection_handler_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ClientAuthHandler); |
| +}; |
| + |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_NET_CLIENT_AUTH_HANDLER_H_ |