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

Unified Diff: net/websockets/websocket_handshake_stream_create_helper.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months 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: net/websockets/websocket_handshake_stream_create_helper.cc
diff --git a/net/websockets/websocket_handshake_stream_create_helper.cc b/net/websockets/websocket_handshake_stream_create_helper.cc
deleted file mode 100644
index 2bd59a125325d39eda5d909910503c03a253b3d3..0000000000000000000000000000000000000000
--- a/net/websockets/websocket_handshake_stream_create_helper.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2013 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 "net/websockets/websocket_handshake_stream_create_helper.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "net/socket/client_socket_handle.h"
-#include "net/spdy/spdy_session.h"
-#include "net/websockets/websocket_basic_handshake_stream.h"
-
-namespace net {
-
-WebSocketHandshakeStreamCreateHelper::WebSocketHandshakeStreamCreateHelper(
- WebSocketStream::ConnectDelegate* connect_delegate,
- const std::vector<std::string>& requested_subprotocols)
- : requested_subprotocols_(requested_subprotocols),
- stream_(NULL),
- connect_delegate_(connect_delegate),
- failure_message_(NULL) {
- DCHECK(connect_delegate_);
-}
-
-WebSocketHandshakeStreamCreateHelper::~WebSocketHandshakeStreamCreateHelper() {}
-
-WebSocketHandshakeStreamBase*
-WebSocketHandshakeStreamCreateHelper::CreateBasicStream(
- scoped_ptr<ClientSocketHandle> connection,
- bool using_proxy) {
- DCHECK(failure_message_) << "set_failure_message() must be called";
- // The list of supported extensions and parameters is hard-coded.
- // TODO(ricea): If more extensions are added, consider a more flexible
- // method.
- std::vector<std::string> extensions(
- 1, "permessage-deflate; client_max_window_bits");
- WebSocketBasicHandshakeStream* stream =
- new WebSocketBasicHandshakeStream(connection.Pass(),
- connect_delegate_,
- using_proxy,
- requested_subprotocols_,
- extensions,
- failure_message_);
- OnStreamCreated(stream);
- stream_ = stream;
- return stream;
-}
-
-// TODO(ricea): Create a WebSocketSpdyHandshakeStream. crbug.com/323852
-WebSocketHandshakeStreamBase*
-WebSocketHandshakeStreamCreateHelper::CreateSpdyStream(
- const base::WeakPtr<SpdySession>& session,
- bool use_relative_url) {
- NOTREACHED() << "Not implemented";
- return NULL;
-}
-
-scoped_ptr<WebSocketStream> WebSocketHandshakeStreamCreateHelper::Upgrade() {
- DCHECK(stream_);
- WebSocketHandshakeStreamBase* stream = stream_;
- stream_ = NULL;
- return stream->Upgrade();
-}
-
-void WebSocketHandshakeStreamCreateHelper::OnStreamCreated(
- WebSocketBasicHandshakeStream* stream) {
-}
-
-} // namespace net

Powered by Google App Engine
This is Rietveld 408576698