| Index: blimp/net/client_auth_handler.cc
|
| diff --git a/blimp/net/client_auth_handler.cc b/blimp/net/client_auth_handler.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c716fe2e4392d84d190aa42fec064b5149a3e620
|
| --- /dev/null
|
| +++ b/blimp/net/client_auth_handler.cc
|
| @@ -0,0 +1,35 @@
|
| +// 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.
|
| +
|
| +#include "blimp/net/client_auth_handler.h"
|
| +
|
| +#include "blimp/common/proto/blimp_message.pb.h"
|
| +#include "blimp/net/blimp_connection.h"
|
| +#include "blimp/net/blimp_message_processor.h"
|
| +#include "net/base/completion_callback.h"
|
| +#include "net/base/net_errors.h"
|
| +
|
| +namespace blimp {
|
| +
|
| +ClientAuthHandler::ClientAuthHandler(ConnectionHandler* connection_handler)
|
| + : connection_handler_(connection_handler) {
|
| + DCHECK(connection_handler_);
|
| +}
|
| +
|
| +ClientAuthHandler::~ClientAuthHandler() {}
|
| +
|
| +void ClientAuthHandler::HandleConnection(
|
| + scoped_ptr<BlimpConnection> connection) {
|
| + connection->GetOutgoingMessageProcessor()->ProcessMessage(
|
| + CreateAuthMessage(), net::CompletionCallback());
|
| + connection_handler_->HandleConnection(std::move(connection));
|
| +}
|
| +
|
| +scoped_ptr<BlimpMessage> ClientAuthHandler::CreateAuthMessage() {
|
| + // TODO(haibinlu): collect client token and checkpoint etc.
|
| + scoped_ptr<BlimpMessage> auth_message(new BlimpMessage);
|
| + return auth_message;
|
| +}
|
| +
|
| +} // namespace blimp
|
|
|