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

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: Merge with fixed linebreaks 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
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/spdy/spdy_test_utils.h » ('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) 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 enable_ip_pooling(true), 354 enable_ip_pooling(true),
355 enable_compression(false), 355 enable_compression(false),
356 enable_ping(false), 356 enable_ping(false),
357 enable_user_alternate_protocol_ports(false), 357 enable_user_alternate_protocol_ports(false),
358 protocol(protocol), 358 protocol(protocol),
359 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 359 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
360 time_func(&base::TimeTicks::Now), 360 time_func(&base::TimeTicks::Now),
361 force_spdy_over_ssl(false), 361 force_spdy_over_ssl(false),
362 force_spdy_always(false), 362 force_spdy_always(false),
363 use_alternate_protocols(false), 363 use_alternate_protocols(false),
364 enable_websocket_over_spdy(false),
364 net_log(NULL) { 365 net_log(NULL) {
365 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 366 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
366 367
367 // Note: The CancelledTransaction test does cleanup by running all 368 // Note: The CancelledTransaction test does cleanup by running all
368 // tasks in the message loop (RunAllPending). Unfortunately, that 369 // tasks in the message loop (RunAllPending). Unfortunately, that
369 // doesn't clean up tasks on the host resolver thread; and 370 // doesn't clean up tasks on the host resolver thread; and
370 // TCPConnectJob is currently not cancellable. Using synchronous 371 // TCPConnectJob is currently not cancellable. Using synchronous
371 // lookups allows the test to shutdown cleanly. Until we have 372 // lookups allows the test to shutdown cleanly. Until we have
372 // cancellable TCPConnectJobs, use synchronous lookups. 373 // cancellable TCPConnectJobs, use synchronous lookups.
373 host_resolver->set_synchronous_mode(true); 374 host_resolver->set_synchronous_mode(true);
(...skipping 13 matching lines...) Expand all
387 enable_ip_pooling(true), 388 enable_ip_pooling(true),
388 enable_compression(false), 389 enable_compression(false),
389 enable_ping(false), 390 enable_ping(false),
390 enable_user_alternate_protocol_ports(false), 391 enable_user_alternate_protocol_ports(false),
391 protocol(protocol), 392 protocol(protocol),
392 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 393 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
393 time_func(&base::TimeTicks::Now), 394 time_func(&base::TimeTicks::Now),
394 force_spdy_over_ssl(false), 395 force_spdy_over_ssl(false),
395 force_spdy_always(false), 396 force_spdy_always(false),
396 use_alternate_protocols(false), 397 use_alternate_protocols(false),
398 enable_websocket_over_spdy(false),
397 net_log(NULL) { 399 net_log(NULL) {
398 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 400 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
399 } 401 }
400 402
401 SpdySessionDependencies::~SpdySessionDependencies() {} 403 SpdySessionDependencies::~SpdySessionDependencies() {}
402 404
403 // static 405 // static
404 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession( 406 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession(
405 SpdySessionDependencies* session_deps) { 407 SpdySessionDependencies* session_deps) {
406 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps); 408 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 session_deps->enable_user_alternate_protocol_ports; 448 session_deps->enable_user_alternate_protocol_ports;
447 params.spdy_default_protocol = session_deps->protocol; 449 params.spdy_default_protocol = session_deps->protocol;
448 params.spdy_stream_initial_recv_window_size = 450 params.spdy_stream_initial_recv_window_size =
449 session_deps->stream_initial_recv_window_size; 451 session_deps->stream_initial_recv_window_size;
450 params.time_func = session_deps->time_func; 452 params.time_func = session_deps->time_func;
451 params.next_protos = session_deps->next_protos; 453 params.next_protos = session_deps->next_protos;
452 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy; 454 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy;
453 params.force_spdy_over_ssl = session_deps->force_spdy_over_ssl; 455 params.force_spdy_over_ssl = session_deps->force_spdy_over_ssl;
454 params.force_spdy_always = session_deps->force_spdy_always; 456 params.force_spdy_always = session_deps->force_spdy_always;
455 params.use_alternate_protocols = session_deps->use_alternate_protocols; 457 params.use_alternate_protocols = session_deps->use_alternate_protocols;
458 params.enable_websocket_over_spdy = session_deps->enable_websocket_over_spdy;
456 params.net_log = session_deps->net_log; 459 params.net_log = session_deps->net_log;
457 return params; 460 return params;
458 } 461 }
459 462
460 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol, 463 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol,
461 bool force_spdy_over_ssl, 464 bool force_spdy_over_ssl,
462 bool force_spdy_always) 465 bool force_spdy_always)
463 : storage_(this) { 466 : storage_(this) {
464 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; 467 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
465 468
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 } 1238 }
1236 } 1239 }
1237 1240
1238 void SpdyTestUtil::SetPriority(RequestPriority priority, 1241 void SpdyTestUtil::SetPriority(RequestPriority priority,
1239 SpdySynStreamIR* ir) const { 1242 SpdySynStreamIR* ir) const {
1240 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1243 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1241 priority, spdy_version())); 1244 priority, spdy_version()));
1242 } 1245 }
1243 1246
1244 } // namespace net 1247 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/spdy/spdy_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698