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

Unified 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698