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

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

Issue 295383007: Get rid of websocket_over_spdy_enabled global. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to rch's comments Created 6 years, 6 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 | Annotate | Revision Log
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 <cstddef> 7 #include <cstddef>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 enable_ip_pooling(true), 353 enable_ip_pooling(true),
354 enable_compression(false), 354 enable_compression(false),
355 enable_ping(false), 355 enable_ping(false),
356 enable_user_alternate_protocol_ports(false), 356 enable_user_alternate_protocol_ports(false),
357 protocol(protocol), 357 protocol(protocol),
358 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 358 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
359 time_func(&base::TimeTicks::Now), 359 time_func(&base::TimeTicks::Now),
360 force_spdy_over_ssl(false), 360 force_spdy_over_ssl(false),
361 force_spdy_always(false), 361 force_spdy_always(false),
362 use_alternate_protocols(false), 362 use_alternate_protocols(false),
363 enable_websocket_over_spdy(false),
363 net_log(NULL) { 364 net_log(NULL) {
364 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 365 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
365 366
366 // Note: The CancelledTransaction test does cleanup by running all 367 // Note: The CancelledTransaction test does cleanup by running all
367 // tasks in the message loop (RunAllPending). Unfortunately, that 368 // tasks in the message loop (RunAllPending). Unfortunately, that
368 // doesn't clean up tasks on the host resolver thread; and 369 // doesn't clean up tasks on the host resolver thread; and
369 // TCPConnectJob is currently not cancellable. Using synchronous 370 // TCPConnectJob is currently not cancellable. Using synchronous
370 // lookups allows the test to shutdown cleanly. Until we have 371 // lookups allows the test to shutdown cleanly. Until we have
371 // cancellable TCPConnectJobs, use synchronous lookups. 372 // cancellable TCPConnectJobs, use synchronous lookups.
372 host_resolver->set_synchronous_mode(true); 373 host_resolver->set_synchronous_mode(true);
(...skipping 13 matching lines...) Expand all
386 enable_ip_pooling(true), 387 enable_ip_pooling(true),
387 enable_compression(false), 388 enable_compression(false),
388 enable_ping(false), 389 enable_ping(false),
389 enable_user_alternate_protocol_ports(false), 390 enable_user_alternate_protocol_ports(false),
390 protocol(protocol), 391 protocol(protocol),
391 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 392 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
392 time_func(&base::TimeTicks::Now), 393 time_func(&base::TimeTicks::Now),
393 force_spdy_over_ssl(false), 394 force_spdy_over_ssl(false),
394 force_spdy_always(false), 395 force_spdy_always(false),
395 use_alternate_protocols(false), 396 use_alternate_protocols(false),
397 enable_websocket_over_spdy(false),
396 net_log(NULL) { 398 net_log(NULL) {
397 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 399 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
398 } 400 }
399 401
400 SpdySessionDependencies::~SpdySessionDependencies() {} 402 SpdySessionDependencies::~SpdySessionDependencies() {}
401 403
402 // static 404 // static
403 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession( 405 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession(
404 SpdySessionDependencies* session_deps) { 406 SpdySessionDependencies* session_deps) {
405 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps); 407 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 session_deps->enable_user_alternate_protocol_ports; 447 session_deps->enable_user_alternate_protocol_ports;
446 params.spdy_default_protocol = session_deps->protocol; 448 params.spdy_default_protocol = session_deps->protocol;
447 params.spdy_stream_initial_recv_window_size = 449 params.spdy_stream_initial_recv_window_size =
448 session_deps->stream_initial_recv_window_size; 450 session_deps->stream_initial_recv_window_size;
449 params.time_func = session_deps->time_func; 451 params.time_func = session_deps->time_func;
450 params.next_protos = session_deps->next_protos; 452 params.next_protos = session_deps->next_protos;
451 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy; 453 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy;
452 params.force_spdy_over_ssl = session_deps->force_spdy_over_ssl; 454 params.force_spdy_over_ssl = session_deps->force_spdy_over_ssl;
453 params.force_spdy_always = session_deps->force_spdy_always; 455 params.force_spdy_always = session_deps->force_spdy_always;
454 params.use_alternate_protocols = session_deps->use_alternate_protocols; 456 params.use_alternate_protocols = session_deps->use_alternate_protocols;
457 params.enable_websocket_over_spdy = session_deps->enable_websocket_over_spdy;
455 params.net_log = session_deps->net_log; 458 params.net_log = session_deps->net_log;
456 return params; 459 return params;
457 } 460 }
458 461
459 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol, 462 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol,
460 bool force_spdy_over_ssl, 463 bool force_spdy_over_ssl,
461 bool force_spdy_always) 464 bool force_spdy_always)
462 : storage_(this) { 465 : storage_(this) {
463 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 466 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
464 467
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 } 1237 }
1235 } 1238 }
1236 1239
1237 void SpdyTestUtil::SetPriority(RequestPriority priority, 1240 void SpdyTestUtil::SetPriority(RequestPriority priority,
1238 SpdySynStreamIR* ir) const { 1241 SpdySynStreamIR* ir) const {
1239 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1242 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1240 priority, spdy_version())); 1243 priority, spdy_version()));
1241 } 1244 }
1242 1245
1243 } // namespace net 1246 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698