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

Side by Side Diff: net/http/http_network_session.cc

Issue 1017853004: Remove HpackHuffmanAggregator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 10 matching lines...) Expand all
21 #include "net/quic/crypto/quic_random.h" 21 #include "net/quic/crypto/quic_random.h"
22 #include "net/quic/quic_clock.h" 22 #include "net/quic/quic_clock.h"
23 #include "net/quic/quic_crypto_client_stream_factory.h" 23 #include "net/quic/quic_crypto_client_stream_factory.h"
24 #include "net/quic/quic_protocol.h" 24 #include "net/quic/quic_protocol.h"
25 #include "net/quic/quic_stream_factory.h" 25 #include "net/quic/quic_stream_factory.h"
26 #include "net/quic/quic_utils.h" 26 #include "net/quic/quic_utils.h"
27 #include "net/socket/client_socket_factory.h" 27 #include "net/socket/client_socket_factory.h"
28 #include "net/socket/client_socket_pool_manager_impl.h" 28 #include "net/socket/client_socket_pool_manager_impl.h"
29 #include "net/socket/next_proto.h" 29 #include "net/socket/next_proto.h"
30 #include "net/socket/ssl_client_socket.h" 30 #include "net/socket/ssl_client_socket.h"
31 #include "net/spdy/hpack_huffman_aggregator.h"
32 #include "net/spdy/spdy_session_pool.h" 31 #include "net/spdy/spdy_session_pool.h"
33 32
34 namespace { 33 namespace {
35 34
36 net::ClientSocketPoolManager* CreateSocketPoolManager( 35 net::ClientSocketPoolManager* CreateSocketPoolManager(
37 net::HttpNetworkSession::SocketPoolType pool_type, 36 net::HttpNetworkSession::SocketPoolType pool_type,
38 const net::HttpNetworkSession::Params& params) { 37 const net::HttpNetworkSession::Params& params) {
39 // TODO(yutak): Differentiate WebSocket pool manager and allow more 38 // TODO(yutak): Differentiate WebSocket pool manager and allow more
40 // simultaneous connections for WebSockets. 39 // simultaneous connections for WebSockets.
41 return new net::ClientSocketPoolManagerImpl( 40 return new net::ClientSocketPoolManagerImpl(
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 AlternateProtocol alternate = AlternateProtocolFromNextProto(proto); 183 AlternateProtocol alternate = AlternateProtocolFromNextProto(proto);
185 if (!IsAlternateProtocolValid(alternate)) { 184 if (!IsAlternateProtocolValid(alternate)) {
186 NOTREACHED() << "Invalid next proto: " << proto; 185 NOTREACHED() << "Invalid next proto: " << proto;
187 continue; 186 continue;
188 } 187 }
189 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = 188 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] =
190 true; 189 true;
191 } 190 }
192 } 191 }
193 192
194 if (HpackHuffmanAggregator::UseAggregator()) {
195 huffman_aggregator_.reset(new HpackHuffmanAggregator());
196 }
197
198 http_server_properties_->SetAlternateProtocolProbabilityThreshold( 193 http_server_properties_->SetAlternateProtocolProbabilityThreshold(
199 params.alternate_protocol_probability_threshold); 194 params.alternate_protocol_probability_threshold);
200 } 195 }
201 196
202 HttpNetworkSession::~HttpNetworkSession() { 197 HttpNetworkSession::~HttpNetworkSession() {
203 STLDeleteElements(&response_drainers_); 198 STLDeleteElements(&response_drainers_);
204 spdy_session_pool_.CloseAllSessions(); 199 spdy_session_pool_.CloseAllSessions();
205 } 200 }
206 201
207 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { 202 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 case WEBSOCKET_SOCKET_POOL: 311 case WEBSOCKET_SOCKET_POOL:
317 return websocket_socket_pool_manager_.get(); 312 return websocket_socket_pool_manager_.get();
318 default: 313 default:
319 NOTREACHED(); 314 NOTREACHED();
320 break; 315 break;
321 } 316 }
322 return NULL; 317 return NULL;
323 } 318 }
324 319
325 } // namespace net 320 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698