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

Side by Side Diff: net/spdy/spdy_test_util_common.cc

Issue 2600973002: Implement HTTP/2 settings field trial parameters. (Closed)
Patch Set: Created 3 years, 12 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/spdy/spdy_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <utility> 10 #include <utility>
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 ssl_config_service(new SSLConfigServiceDefaults), 336 ssl_config_service(new SSLConfigServiceDefaults),
337 socket_factory(new MockClientSocketFactory), 337 socket_factory(new MockClientSocketFactory),
338 http_auth_handler_factory( 338 http_auth_handler_factory(
339 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())), 339 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())),
340 http_server_properties(new HttpServerPropertiesImpl), 340 http_server_properties(new HttpServerPropertiesImpl),
341 enable_ip_pooling(true), 341 enable_ip_pooling(true),
342 enable_ping(false), 342 enable_ping(false),
343 enable_user_alternate_protocol_ports(false), 343 enable_user_alternate_protocol_ports(false),
344 enable_quic(false), 344 enable_quic(false),
345 session_max_recv_window_size(kDefaultInitialWindowSize), 345 session_max_recv_window_size(kDefaultInitialWindowSize),
346 stream_max_recv_window_size(kDefaultInitialWindowSize),
347 time_func(&base::TimeTicks::Now), 346 time_func(&base::TimeTicks::Now),
348 enable_http2_alternative_service_with_different_host(false), 347 enable_http2_alternative_service_with_different_host(false),
349 net_log(nullptr), 348 net_log(nullptr),
350 http_09_on_non_default_ports_enabled(false) { 349 http_09_on_non_default_ports_enabled(false) {
351 // Note: The CancelledTransaction test does cleanup by running all 350 // Note: The CancelledTransaction test does cleanup by running all
352 // tasks in the message loop (RunAllPending). Unfortunately, that 351 // tasks in the message loop (RunAllPending). Unfortunately, that
353 // doesn't clean up tasks on the host resolver thread; and 352 // doesn't clean up tasks on the host resolver thread; and
354 // TCPConnectJob is currently not cancellable. Using synchronous 353 // TCPConnectJob is currently not cancellable. Using synchronous
355 // lookups allows the test to shutdown cleanly. Until we have 354 // lookups allows the test to shutdown cleanly. Until we have
356 // cancellable TCPConnectJobs, use synchronous lookups. 355 // cancellable TCPConnectJobs, use synchronous lookups.
357 host_resolver->set_synchronous_mode(true); 356 host_resolver->set_synchronous_mode(true);
357 http2_settings[SETTINGS_INITIAL_WINDOW_SIZE] = kDefaultInitialWindowSize;
358 } 358 }
359 359
360 SpdySessionDependencies::~SpdySessionDependencies() {} 360 SpdySessionDependencies::~SpdySessionDependencies() {}
361 361
362 // static 362 // static
363 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession( 363 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession(
364 SpdySessionDependencies* session_deps) { 364 SpdySessionDependencies* session_deps) {
365 HttpNetworkSession::Params params = CreateSessionParams(session_deps); 365 HttpNetworkSession::Params params = CreateSessionParams(session_deps);
366 params.client_socket_factory = session_deps->socket_factory.get(); 366 params.client_socket_factory = session_deps->socket_factory.get();
367 std::unique_ptr<HttpNetworkSession> http_session( 367 std::unique_ptr<HttpNetworkSession> http_session(
(...skipping 19 matching lines...) Expand all
387 params.ssl_config_service = session_deps->ssl_config_service.get(); 387 params.ssl_config_service = session_deps->ssl_config_service.get();
388 params.http_auth_handler_factory = 388 params.http_auth_handler_factory =
389 session_deps->http_auth_handler_factory.get(); 389 session_deps->http_auth_handler_factory.get();
390 params.http_server_properties = session_deps->http_server_properties.get(); 390 params.http_server_properties = session_deps->http_server_properties.get();
391 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping; 391 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping;
392 params.enable_user_alternate_protocol_ports = 392 params.enable_user_alternate_protocol_ports =
393 session_deps->enable_user_alternate_protocol_ports; 393 session_deps->enable_user_alternate_protocol_ports;
394 params.enable_quic = session_deps->enable_quic; 394 params.enable_quic = session_deps->enable_quic;
395 params.spdy_session_max_recv_window_size = 395 params.spdy_session_max_recv_window_size =
396 session_deps->session_max_recv_window_size; 396 session_deps->session_max_recv_window_size;
397 params.spdy_stream_max_recv_window_size = 397 params.http2_settings = session_deps->http2_settings;
398 session_deps->stream_max_recv_window_size;
399 params.time_func = session_deps->time_func; 398 params.time_func = session_deps->time_func;
400 params.proxy_delegate = session_deps->proxy_delegate.get(); 399 params.proxy_delegate = session_deps->proxy_delegate.get();
401 params.enable_http2_alternative_service_with_different_host = 400 params.enable_http2_alternative_service_with_different_host =
402 session_deps->enable_http2_alternative_service_with_different_host; 401 session_deps->enable_http2_alternative_service_with_different_host;
403 params.net_log = session_deps->net_log; 402 params.net_log = session_deps->net_log;
404 params.http_09_on_non_default_ports_enabled = 403 params.http_09_on_non_default_ports_enabled =
405 session_deps->http_09_on_non_default_ports_enabled; 404 session_deps->http_09_on_non_default_ports_enabled;
406 return params; 405 return params;
407 } 406 }
408 407
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 headers[GetSchemeKey()] = scheme.c_str(); 1124 headers[GetSchemeKey()] = scheme.c_str();
1126 headers[GetPathKey()] = path.c_str(); 1125 headers[GetPathKey()] = path.c_str();
1127 if (content_length) { 1126 if (content_length) {
1128 std::string length_str = base::Int64ToString(*content_length); 1127 std::string length_str = base::Int64ToString(*content_length);
1129 headers["content-length"] = length_str; 1128 headers["content-length"] = length_str;
1130 } 1129 }
1131 return headers; 1130 return headers;
1132 } 1131 }
1133 1132
1134 } // namespace net 1133 } // namespace net
OLDNEW
« net/spdy/spdy_session_pool.h ('K') | « net/spdy/spdy_test_util_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698