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

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

Issue 2130493002: Implement THROTTLED priority semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NetworkStreamThrottler
Patch Set: Incorporate Charles' first set of comments. Created 4 years, 5 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
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/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/debug/stack_trace.h" 11 #include "base/debug/stack_trace.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/profiler/scoped_tracker.h" 13 #include "base/profiler/scoped_tracker.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "net/base/network_throttle_manager.h" 18 #include "net/base/network_throttle_manager_impl.h"
19 #include "net/http/http_auth_handler_factory.h" 19 #include "net/http/http_auth_handler_factory.h"
20 #include "net/http/http_response_body_drainer.h" 20 #include "net/http/http_response_body_drainer.h"
21 #include "net/http/http_stream_factory_impl.h" 21 #include "net/http/http_stream_factory_impl.h"
22 #include "net/http/url_security_manager.h" 22 #include "net/http/url_security_manager.h"
23 #include "net/proxy/proxy_service.h" 23 #include "net/proxy/proxy_service.h"
24 #include "net/quic/crypto/quic_random.h" 24 #include "net/quic/crypto/quic_random.h"
25 #include "net/quic/quic_clock.h" 25 #include "net/quic/quic_clock.h"
26 #include "net/quic/quic_crypto_client_stream_factory.h" 26 #include "net/quic/quic_crypto_client_stream_factory.h"
27 #include "net/quic/quic_protocol.h" 27 #include "net/quic/quic_protocol.h"
28 #include "net/quic/quic_stream_factory.h" 28 #include "net/quic/quic_stream_factory.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 params.transport_security_state, 194 params.transport_security_state,
195 params.enable_spdy_ping_based_connection_checking, 195 params.enable_spdy_ping_based_connection_checking,
196 params.enable_priority_dependencies, 196 params.enable_priority_dependencies,
197 params.spdy_default_protocol, 197 params.spdy_default_protocol,
198 params.spdy_session_max_recv_window_size, 198 params.spdy_session_max_recv_window_size,
199 params.spdy_stream_max_recv_window_size, 199 params.spdy_stream_max_recv_window_size,
200 params.time_func, 200 params.time_func,
201 params.proxy_delegate), 201 params.proxy_delegate),
202 http_stream_factory_(new HttpStreamFactoryImpl(this, false)), 202 http_stream_factory_(new HttpStreamFactoryImpl(this, false)),
203 http_stream_factory_for_websocket_(new HttpStreamFactoryImpl(this, true)), 203 http_stream_factory_for_websocket_(new HttpStreamFactoryImpl(this, true)),
204 network_stream_throttler_(NetworkThrottleManager::CreateThrottler()), 204 network_stream_throttler_(new NetworkThrottleManagerImpl()),
205 params_(params) { 205 params_(params) {
206 DCHECK(proxy_service_); 206 DCHECK(proxy_service_);
207 DCHECK(ssl_config_service_.get()); 207 DCHECK(ssl_config_service_.get());
208 CHECK(http_server_properties_); 208 CHECK(http_server_properties_);
209 209
210 const std::string ssl_session_cache_shard = 210 const std::string ssl_session_cache_shard =
211 "http_network_session/" + base::IntToString(g_next_shard_id.GetNext()); 211 "http_network_session/" + base::IntToString(g_next_shard_id.GetNext());
212 normal_socket_pool_manager_.reset(CreateSocketPoolManager( 212 normal_socket_pool_manager_.reset(CreateSocketPoolManager(
213 NORMAL_SOCKET_POOL, params, ssl_session_cache_shard)); 213 NORMAL_SOCKET_POOL, params, ssl_session_cache_shard));
214 websocket_socket_pool_manager_.reset(CreateSocketPoolManager( 214 websocket_socket_pool_manager_.reset(CreateSocketPoolManager(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 case WEBSOCKET_SOCKET_POOL: 405 case WEBSOCKET_SOCKET_POOL:
406 return websocket_socket_pool_manager_.get(); 406 return websocket_socket_pool_manager_.get();
407 default: 407 default:
408 NOTREACHED(); 408 NOTREACHED();
409 break; 409 break;
410 } 410 }
411 return NULL; 411 return NULL;
412 } 412 }
413 413
414 } // namespace net 414 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698