Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: blimp/net/client_auth_handler.cc

Issue 1501463003: [Blimp Net] Client sends START_CONNECTION message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698