diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-15 21:27:26 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-15 21:27:26 +0000 |
commit | aeb5ccec77fbc0691e766ee80b7c4f4efb79bd9d (patch) | |
tree | 45b8065c0a5403fe8881cca7f532935fd15843ed /net/http | |
parent | 4b927fefc38dbd65ec8fec517d3cbf27cb2465b7 (diff) | |
download | chromium_src-aeb5ccec77fbc0691e766ee80b7c4f4efb79bd9d.zip chromium_src-aeb5ccec77fbc0691e766ee80b7c4f4efb79bd9d.tar.gz chromium_src-aeb5ccec77fbc0691e766ee80b7c4f4efb79bd9d.tar.bz2 |
Revert 173311
> Integrating the QuicStreamFactory into the network stack.
>
>
> Review URL: https://chromiumcodereview.appspot.com/11416058
TBR=rch@chromium.org
Review URL: https://codereview.chromium.org/11591005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_layer.cc | 1 | ||||
-rw-r--r-- | net/http/http_network_session.cc | 10 | ||||
-rw-r--r-- | net/http/http_network_session.h | 4 | ||||
-rw-r--r-- | net/http/http_stream_factory_impl_job.cc | 28 | ||||
-rw-r--r-- | net/http/http_stream_factory_impl_job.h | 12 |
5 files changed, 3 insertions, 52 deletions
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc index b7b3048..1acc4c0 100644 --- a/net/http/http_network_layer.cc +++ b/net/http/http_network_layer.cc @@ -11,7 +11,6 @@ #include "net/http/http_network_session.h" #include "net/http/http_network_transaction.h" #include "net/http/http_server_properties_impl.h" -#include "net/http/http_stream_factory_impl_job.h" #include "net/spdy/spdy_framer.h" #include "net/spdy/spdy_session.h" #include "net/spdy/spdy_session_pool.h" diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index dfc6d95..daace43 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc @@ -9,7 +9,6 @@ #include "base/compiler_specific.h" #include "base/debug/stack_trace.h" #include "base/logging.h" -#include "base/rand_util.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/values.h" @@ -18,8 +17,6 @@ #include "net/http/http_stream_factory_impl.h" #include "net/http/url_security_manager.h" #include "net/proxy/proxy_service.h" -#include "net/quic/quic_clock.h" -#include "net/quic/quic_stream_factory.h" #include "net/socket/client_socket_factory.h" #include "net/socket/client_socket_pool_manager_impl.h" #include "net/socket/next_proto.h" @@ -79,8 +76,7 @@ HttpNetworkSession::Params::Params() spdy_initial_recv_window_size(0), spdy_initial_max_concurrent_streams(0), spdy_max_concurrent_streams_limit(0), - time_func(&base::TimeTicks::Now), - origin_port_to_force_quic_on(0) { + time_func(&base::TimeTicks::Now) { } // TODO(mbelshe): Move the socket factories into HttpStreamFactory. @@ -97,10 +93,6 @@ HttpNetworkSession::HttpNetworkSession(const Params& params) CreateSocketPoolManager(NORMAL_SOCKET_POOL, params)), websocket_socket_pool_manager_( CreateSocketPoolManager(WEBSOCKET_SOCKET_POOL, params)), - quic_stream_factory_(params.host_resolver, - net::ClientSocketFactory::GetDefaultFactory(), - base::Bind(&base::RandUint64), - new QuicClock()), spdy_session_pool_(params.host_resolver, params.ssl_config_service, params.http_server_properties, diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index c7f7783..d47b5a4 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h @@ -14,7 +14,6 @@ #include "net/base/ssl_client_auth_cache.h" #include "net/http/http_auth_cache.h" #include "net/http/http_stream_factory.h" -#include "net/quic/quic_stream_factory.h" #include "net/spdy/spdy_session_pool.h" namespace base { @@ -80,7 +79,6 @@ class NET_EXPORT HttpNetworkSession size_t spdy_max_concurrent_streams_limit; SpdySessionPool::TimeFunc time_func; std::string trusted_spdy_proxy; - uint16 origin_port_to_force_quic_on; }; enum SocketPoolType { @@ -116,7 +114,6 @@ class NET_EXPORT HttpNetworkSession ProxyService* proxy_service() { return proxy_service_; } SSLConfigService* ssl_config_service() { return ssl_config_service_; } SpdySessionPool* spdy_session_pool() { return &spdy_session_pool_; } - QuicStreamFactory* quic_stream_factory() { return &quic_stream_factory_; } HttpAuthHandlerFactory* http_auth_handler_factory() { return http_auth_handler_factory_; } @@ -176,7 +173,6 @@ class NET_EXPORT HttpNetworkSession SSLClientAuthCache ssl_client_auth_cache_; scoped_ptr<ClientSocketPoolManager> normal_socket_pool_manager_; scoped_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_; - QuicStreamFactory quic_stream_factory_; SpdySessionPool spdy_session_pool_; scoped_ptr<HttpStreamFactory> http_stream_factory_; std::set<HttpResponseBodyDrainer*> response_drainers_; diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc index 2208dc4..ddd5ae6 100644 --- a/net/http/http_stream_factory_impl_job.cc +++ b/net/http/http_stream_factory_impl_job.cc @@ -28,7 +28,6 @@ #include "net/http/http_server_properties.h" #include "net/http/http_stream_factory.h" #include "net/http/http_stream_factory_impl_request.h" -#include "net/quic/quic_http_stream.h" #include "net/socket/client_socket_handle.h" #include "net/socket/client_socket_pool.h" #include "net/socket/client_socket_pool_manager.h" @@ -90,8 +89,6 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, waiting_job_(NULL), using_ssl_(false), using_spdy_(false), - using_quic_(false), - quic_request_(session_->quic_stream_factory()), force_spdy_always_(HttpStreamFactory::force_spdy_always()), force_spdy_over_ssl_(HttpStreamFactory::force_spdy_over_ssl()), spdy_certificate_error_(OK), @@ -160,7 +157,7 @@ LoadState HttpStreamFactoryImpl::Job::GetLoadState() const { case STATE_RESOLVE_PROXY_COMPLETE: return session_->proxy_service()->GetLoadState(pac_request_); case STATE_CREATE_STREAM_COMPLETE: - return using_quic_ ? LOAD_STATE_CONNECTING : connection_->GetLoadState(); + return connection_->GetLoadState(); case STATE_INIT_CONNECTION_COMPLETE: return LOAD_STATE_SENDING_REQUEST; default: @@ -641,12 +638,6 @@ bool HttpStreamFactoryImpl::Job::ShouldForceSpdyWithoutSSL() const { return rv && !HttpStreamFactory::HasSpdyExclusion(origin_); } -bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const { - return session_->params().origin_port_to_force_quic_on == origin_.port() - && session_->params().origin_port_to_force_quic_on != 0 - && proxy_info_.is_direct(); -} - int HttpStreamFactoryImpl::Job::DoWaitForJob() { DCHECK(blocking_job_); next_state_ = STATE_WAIT_FOR_JOB_COMPLETE; @@ -669,12 +660,6 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() { using_ssl_ = request_info_.url.SchemeIs("https") || ShouldForceSpdySSL(); using_spdy_ = false; - if (ShouldForceQuic()) { - next_state_ = STATE_CREATE_STREAM; - using_quic_ = true; - return OK; - } - // Check first if we have a spdy session for this group. If so, then go // straight to using that. HostPortProxyPair spdy_session_key = GetSpdySessionKey(); @@ -918,7 +903,7 @@ int HttpStreamFactoryImpl::Job::DoWaitingUserAction(int result) { int HttpStreamFactoryImpl::Job::DoCreateStream() { DCHECK(connection_->socket() || existing_spdy_session_ || - existing_available_pipeline_ || using_quic_); + existing_available_pipeline_); next_state_ = STATE_CREATE_STREAM_COMPLETE; @@ -930,11 +915,6 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() { const ProxyServer& proxy_server = proxy_info_.proxy_server(); - if (using_quic_) { - return quic_request_.Request(HostPortProxyPair(origin_, proxy_server), - net_log_, io_callback_); - } - if (!using_spdy_) { bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && request_info_.url.SchemeIs("http"); @@ -1017,10 +997,6 @@ int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { if (result < 0) return result; - if (using_quic_) { - stream_ = quic_request_.ReleaseStream(); - } - session_->proxy_service()->ReportSuccess(proxy_info_); next_state_ = STATE_NONE; return OK; diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h index 5494097..97f4637 100644 --- a/net/http/http_stream_factory_impl_job.h +++ b/net/http/http_stream_factory_impl_job.h @@ -17,7 +17,6 @@ #include "net/http/http_request_info.h" #include "net/http/http_stream_factory_impl.h" #include "net/proxy/proxy_service.h" -#include "net/quic/quic_stream_factory.h" #include "net/socket/client_socket_handle.h" #include "net/socket/ssl_client_socket.h" @@ -28,7 +27,6 @@ class HttpAuthController; class HttpNetworkSession; class HttpStream; class SpdySessionPool; -class QuicHttpStream; // An HttpStreamRequestImpl exists for each stream which is in progress of being // created for the StreamFactory. @@ -205,9 +203,6 @@ class HttpStreamFactoryImpl::Job { // Should we force SPDY to run without SSL for this stream request. bool ShouldForceSpdyWithoutSSL() const; - // Should we force QUIC for this stream request. - bool ShouldForceQuic() const; - bool IsRequestEligibleForPipelining(); // Record histograms of latency until Connect() completes. @@ -264,19 +259,12 @@ class HttpStreamFactoryImpl::Job { // True if this network transaction is using SPDY instead of HTTP. bool using_spdy_; - // True if this network transaction is using QUIC instead of HTTP. - bool using_quic_; - QuicStreamRequest quic_request_; - // Force spdy for all connections. bool force_spdy_always_; // Force spdy only for SSL connections. bool force_spdy_over_ssl_; - // Force quic for a specific port. - int force_quic_port_; - // The certificate error while using SPDY over SSL for insecure URLs. int spdy_certificate_error_; |