| 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 #include "blimp/net/client_auth_handler.h" |
| 6 |
| 7 #include "blimp/common/proto/blimp_message.pb.h" |
| 8 #include "blimp/net/blimp_connection.h" |
| 9 #include "blimp/net/blimp_message_processor.h" |
| 10 #include "net/base/completion_callback.h" |
| 11 #include "net/base/net_errors.h" |
| 12 |
| 13 namespace blimp { |
| 14 |
| 15 ClientAuthHandler::ClientAuthHandler(ConnectionHandler* connection_handler) |
| 16 : connection_handler_(connection_handler) { |
| 17 DCHECK(connection_handler_); |
| 18 } |
| 19 |
| 20 ClientAuthHandler::~ClientAuthHandler() {} |
| 21 |
| 22 void ClientAuthHandler::HandleConnection( |
| 23 scoped_ptr<BlimpConnection> connection) { |
| 24 connection->GetOutgoingMessageProcessor()->ProcessMessage( |
| 25 CreateAuthMessage(), net::CompletionCallback()); |
| 26 connection_handler_->HandleConnection(std::move(connection)); |
| 27 } |
| 28 |
| 29 scoped_ptr<BlimpMessage> ClientAuthHandler::CreateAuthMessage() { |
| 30 // TODO(haibinlu): collect client token and checkpoint etc. |
| 31 scoped_ptr<BlimpMessage> auth_message(new BlimpMessage); |
| 32 return auth_message; |
| 33 } |
| 34 |
| 35 } // namespace blimp |
| OLD | NEW |