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

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

Issue 1817583002: Process Alternative Service headers in net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@toggle2
Patch Set: Address comments and rebased Created 4 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/spdy/spdy_test_util_common.h ('k') | no next file » | 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) 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 #include <cstddef> 8 #include <cstddef>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 proxy_service(ProxyService::CreateDirect()), 335 proxy_service(ProxyService::CreateDirect()),
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 enable_ip_pooling(true), 340 enable_ip_pooling(true),
341 enable_ping(false), 341 enable_ping(false),
342 enable_user_alternate_protocol_ports(false), 342 enable_user_alternate_protocol_ports(false),
343 enable_npn(true), 343 enable_npn(true),
344 enable_priority_dependencies(true), 344 enable_priority_dependencies(true),
345 enable_quic(false),
345 protocol(protocol), 346 protocol(protocol),
346 session_max_recv_window_size( 347 session_max_recv_window_size(
347 SpdySession::GetDefaultInitialWindowSize(protocol)), 348 SpdySession::GetDefaultInitialWindowSize(protocol)),
348 stream_max_recv_window_size( 349 stream_max_recv_window_size(
349 SpdySession::GetDefaultInitialWindowSize(protocol)), 350 SpdySession::GetDefaultInitialWindowSize(protocol)),
350 time_func(&base::TimeTicks::Now), 351 time_func(&base::TimeTicks::Now),
351 parse_alternative_services(false), 352 parse_alternative_services(false),
352 enable_alternative_service_with_different_host(false), 353 enable_alternative_service_with_different_host(false),
353 net_log(NULL) { 354 net_log(NULL) {
354 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 355 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
(...skipping 17 matching lines...) Expand all
372 proxy_service(std::move(proxy_service)), 373 proxy_service(std::move(proxy_service)),
373 ssl_config_service(new SSLConfigServiceDefaults), 374 ssl_config_service(new SSLConfigServiceDefaults),
374 socket_factory(new MockClientSocketFactory), 375 socket_factory(new MockClientSocketFactory),
375 http_auth_handler_factory( 376 http_auth_handler_factory(
376 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())), 377 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())),
377 enable_ip_pooling(true), 378 enable_ip_pooling(true),
378 enable_ping(false), 379 enable_ping(false),
379 enable_user_alternate_protocol_ports(false), 380 enable_user_alternate_protocol_ports(false),
380 enable_npn(true), 381 enable_npn(true),
381 enable_priority_dependencies(true), 382 enable_priority_dependencies(true),
383 enable_quic(false),
382 protocol(protocol), 384 protocol(protocol),
383 session_max_recv_window_size( 385 session_max_recv_window_size(
384 SpdySession::GetDefaultInitialWindowSize(protocol)), 386 SpdySession::GetDefaultInitialWindowSize(protocol)),
385 stream_max_recv_window_size( 387 stream_max_recv_window_size(
386 SpdySession::GetDefaultInitialWindowSize(protocol)), 388 SpdySession::GetDefaultInitialWindowSize(protocol)),
387 time_func(&base::TimeTicks::Now), 389 time_func(&base::TimeTicks::Now),
388 parse_alternative_services(false), 390 parse_alternative_services(false),
389 enable_alternative_service_with_different_host(false), 391 enable_alternative_service_with_different_host(false),
390 net_log(NULL) { 392 net_log(NULL) {
391 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 393 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
(...skipping 29 matching lines...) Expand all
421 params.http_auth_handler_factory = 423 params.http_auth_handler_factory =
422 session_deps->http_auth_handler_factory.get(); 424 session_deps->http_auth_handler_factory.get();
423 params.http_server_properties = 425 params.http_server_properties =
424 session_deps->http_server_properties.GetWeakPtr(); 426 session_deps->http_server_properties.GetWeakPtr();
425 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping; 427 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping;
426 params.enable_user_alternate_protocol_ports = 428 params.enable_user_alternate_protocol_ports =
427 session_deps->enable_user_alternate_protocol_ports; 429 session_deps->enable_user_alternate_protocol_ports;
428 params.enable_npn = session_deps->enable_npn; 430 params.enable_npn = session_deps->enable_npn;
429 params.enable_priority_dependencies = 431 params.enable_priority_dependencies =
430 session_deps->enable_priority_dependencies; 432 session_deps->enable_priority_dependencies;
433 params.enable_quic = session_deps->enable_quic;
431 params.spdy_default_protocol = session_deps->protocol; 434 params.spdy_default_protocol = session_deps->protocol;
432 params.spdy_session_max_recv_window_size = 435 params.spdy_session_max_recv_window_size =
433 session_deps->session_max_recv_window_size; 436 session_deps->session_max_recv_window_size;
434 params.spdy_stream_max_recv_window_size = 437 params.spdy_stream_max_recv_window_size =
435 session_deps->stream_max_recv_window_size; 438 session_deps->stream_max_recv_window_size;
436 params.time_func = session_deps->time_func; 439 params.time_func = session_deps->time_func;
437 params.proxy_delegate = session_deps->proxy_delegate.get(); 440 params.proxy_delegate = session_deps->proxy_delegate.get();
438 params.parse_alternative_services = session_deps->parse_alternative_services; 441 params.parse_alternative_services = session_deps->parse_alternative_services;
439 params.enable_alternative_service_with_different_host = 442 params.enable_alternative_service_with_different_host =
440 session_deps->enable_alternative_service_with_different_host; 443 session_deps->enable_alternative_service_with_different_host;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1280 }
1278 } 1281 }
1279 1282
1280 void SpdyTestUtil::SetPriority(RequestPriority priority, 1283 void SpdyTestUtil::SetPriority(RequestPriority priority,
1281 SpdySynStreamIR* ir) const { 1284 SpdySynStreamIR* ir) const {
1282 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1285 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1283 priority, spdy_version())); 1286 priority, spdy_version()));
1284 } 1287 }
1285 1288
1286 } // namespace net 1289 } // namespace net
OLDNEW
« no previous file with comments | « 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