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

Unified Diff: net/http/http_pipelined_host_forced.cc

Issue 275953002: Remove HTTP pipelining support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix line endings Created 6 years, 7 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
« no previous file with comments | « net/http/http_pipelined_host_forced.h ('k') | net/http/http_pipelined_host_forced_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_pipelined_host_forced.cc
diff --git a/net/http/http_pipelined_host_forced.cc b/net/http/http_pipelined_host_forced.cc
deleted file mode 100644
index 8059d848d73904bde01b0d2df4b7e1df09b8a09d..0000000000000000000000000000000000000000
--- a/net/http/http_pipelined_host_forced.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2012 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/http/http_pipelined_host_forced.h"
-
-#include "base/values.h"
-#include "net/http/http_pipelined_connection_impl.h"
-#include "net/http/http_pipelined_stream.h"
-#include "net/socket/buffered_write_stream_socket.h"
-#include "net/socket/client_socket_handle.h"
-
-namespace net {
-
-HttpPipelinedHostForced::HttpPipelinedHostForced(
- HttpPipelinedHost::Delegate* delegate,
- const Key& key,
- HttpPipelinedConnection::Factory* factory)
- : delegate_(delegate),
- key_(key),
- factory_(factory) {
- if (!factory) {
- factory_.reset(new HttpPipelinedConnectionImpl::Factory());
- }
-}
-
-HttpPipelinedHostForced::~HttpPipelinedHostForced() {
- CHECK(!pipeline_.get());
-}
-
-HttpPipelinedStream* HttpPipelinedHostForced::CreateStreamOnNewPipeline(
- ClientSocketHandle* connection,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- const BoundNetLog& net_log,
- bool was_npn_negotiated,
- NextProto protocol_negotiated) {
- CHECK(!pipeline_.get());
- scoped_ptr<BufferedWriteStreamSocket> buffered_socket(
- new BufferedWriteStreamSocket(connection->PassSocket()));
- connection->SetSocket(buffered_socket.PassAs<StreamSocket>());
- pipeline_.reset(factory_->CreateNewPipeline(
- connection, this, key_.origin(), used_ssl_config, used_proxy_info,
- net_log, was_npn_negotiated, protocol_negotiated));
- return pipeline_->CreateNewStream();
-}
-
-HttpPipelinedStream* HttpPipelinedHostForced::CreateStreamOnExistingPipeline() {
- if (!pipeline_.get()) {
- return NULL;
- }
- return pipeline_->CreateNewStream();
-}
-
-bool HttpPipelinedHostForced::IsExistingPipelineAvailable() const {
- return pipeline_.get() != NULL;
-}
-
-const HttpPipelinedHost::Key& HttpPipelinedHostForced::GetKey() const {
- return key_;
-}
-
-void HttpPipelinedHostForced::OnPipelineEmpty(
- HttpPipelinedConnection* pipeline) {
- CHECK_EQ(pipeline_.get(), pipeline);
- pipeline_.reset();
- delegate_->OnHostIdle(this);
- // WARNING: We'll probably be deleted here.
-}
-
-void HttpPipelinedHostForced::OnPipelineHasCapacity(
- HttpPipelinedConnection* pipeline) {
- CHECK_EQ(pipeline_.get(), pipeline);
- delegate_->OnHostHasAdditionalCapacity(this);
- if (!pipeline->depth()) {
- OnPipelineEmpty(pipeline);
- // WARNING: We might be deleted here.
- }
-}
-
-void HttpPipelinedHostForced::OnPipelineFeedback(
- HttpPipelinedConnection* pipeline,
- HttpPipelinedConnection::Feedback feedback) {
- // We don't care. We always pipeline.
-}
-
-base::Value* HttpPipelinedHostForced::PipelineInfoToValue() const {
- base::ListValue* list_value = new base::ListValue();
- if (pipeline_.get()) {
- base::DictionaryValue* pipeline_dict = new base::DictionaryValue;
- pipeline_dict->SetString("host", key_.origin().ToString());
- pipeline_dict->SetBoolean("forced", true);
- pipeline_dict->SetInteger("depth", pipeline_->depth());
- pipeline_dict->SetInteger("capacity", 1000);
- pipeline_dict->SetBoolean("usable", pipeline_->usable());
- pipeline_dict->SetBoolean("active", pipeline_->active());
- pipeline_dict->SetInteger("source_id", pipeline_->net_log().source().id);
- list_value->Append(pipeline_dict);
- }
- return list_value;
-}
-
-} // namespace net
« no previous file with comments | « net/http/http_pipelined_host_forced.h ('k') | net/http/http_pipelined_host_forced_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698