Chromium Code Reviews| Index: blimp/net/engine_authentication_handler.h |
| diff --git a/blimp/net/engine_authentication_handler.h b/blimp/net/engine_authentication_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ee0e26bb27ac1244c262542a094dfebceaf22d0d |
| --- /dev/null |
| +++ b/blimp/net/engine_authentication_handler.h |
| @@ -0,0 +1,40 @@ |
| +// 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_ENGINE_AUTHENTICATION_HANDLER_H_ |
| +#define BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "blimp/net/blimp_net_export.h" |
| +#include "blimp/net/connection_handler.h" |
| + |
| +namespace blimp { |
| + |
| +class BlimpConnection; |
| +class BlimpMessage; |
| + |
| +// Authenticates connections and passes successfully authenticated connections |
| +// to |connection_handler|. |
| +class BLIMP_NET_EXPORT EngineAuthenticationHandler : public ConnectionHandler { |
| + public: |
| + explicit EngineAuthenticationHandler(ConnectionHandler* connection_handler); |
| + |
| + ~EngineAuthenticationHandler() override; |
| + |
| + // ConnectionHandler implementation. |
| + void HandleConnection(scoped_ptr<BlimpConnection> connection) override; |
| + |
| + private: |
| + // Handler for authenticated connections. |
|
Wez
2015/12/08 00:31:41
nit: Suggest "Used to abandon pending authenticati
haibinlu
2015/12/08 01:54:50
Done.
|
| + base::WeakPtrFactory<ConnectionHandler> connection_handler_weak_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(EngineAuthenticationHandler); |
| +}; |
| + |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ |