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

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

Issue 13845012: [SPDY] Add flag and about:flags entry for SPDY/4 alpha 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 8 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_spdy3.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) 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/spdy/spdy_test_util_spdy3.h" 5 #include "net/spdy/spdy_test_util_spdy3.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 ssl_config_service(new SSLConfigServiceDefaults), 747 ssl_config_service(new SSLConfigServiceDefaults),
748 socket_factory(new MockClientSocketFactory), 748 socket_factory(new MockClientSocketFactory),
749 deterministic_socket_factory(new DeterministicMockClientSocketFactory), 749 deterministic_socket_factory(new DeterministicMockClientSocketFactory),
750 http_auth_handler_factory( 750 http_auth_handler_factory(
751 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())), 751 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())),
752 enable_ip_pooling(true), 752 enable_ip_pooling(true),
753 enable_compression(false), 753 enable_compression(false),
754 enable_ping(false), 754 enable_ping(false),
755 enable_user_alternate_protocol_ports(false), 755 enable_user_alternate_protocol_ports(false),
756 enable_spdy_31(false), 756 enable_spdy_31(false),
757 enable_spdy_4(false),
757 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 758 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
758 time_func(&base::TimeTicks::Now), 759 time_func(&base::TimeTicks::Now),
759 net_log(NULL) { 760 net_log(NULL) {
760 // Note: The CancelledTransaction test does cleanup by running all 761 // Note: The CancelledTransaction test does cleanup by running all
761 // tasks in the message loop (RunAllPending). Unfortunately, that 762 // tasks in the message loop (RunAllPending). Unfortunately, that
762 // doesn't clean up tasks on the host resolver thread; and 763 // doesn't clean up tasks on the host resolver thread; and
763 // TCPConnectJob is currently not cancellable. Using synchronous 764 // TCPConnectJob is currently not cancellable. Using synchronous
764 // lookups allows the test to shutdown cleanly. Until we have 765 // lookups allows the test to shutdown cleanly. Until we have
765 // cancellable TCPConnectJobs, use synchronous lookups. 766 // cancellable TCPConnectJobs, use synchronous lookups.
766 host_resolver->set_synchronous_mode(true); 767 host_resolver->set_synchronous_mode(true);
767 } 768 }
768 769
769 SpdySessionDependencies::SpdySessionDependencies(ProxyService* proxy_service) 770 SpdySessionDependencies::SpdySessionDependencies(ProxyService* proxy_service)
770 : host_resolver(new MockHostResolver), 771 : host_resolver(new MockHostResolver),
771 cert_verifier(new MockCertVerifier), 772 cert_verifier(new MockCertVerifier),
772 proxy_service(proxy_service), 773 proxy_service(proxy_service),
773 ssl_config_service(new SSLConfigServiceDefaults), 774 ssl_config_service(new SSLConfigServiceDefaults),
774 socket_factory(new MockClientSocketFactory), 775 socket_factory(new MockClientSocketFactory),
775 deterministic_socket_factory(new DeterministicMockClientSocketFactory), 776 deterministic_socket_factory(new DeterministicMockClientSocketFactory),
776 http_auth_handler_factory( 777 http_auth_handler_factory(
777 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())), 778 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())),
778 enable_ip_pooling(true), 779 enable_ip_pooling(true),
779 enable_compression(false), 780 enable_compression(false),
780 enable_ping(false), 781 enable_ping(false),
781 enable_user_alternate_protocol_ports(false), 782 enable_user_alternate_protocol_ports(false),
782 enable_spdy_31(false), 783 enable_spdy_31(false),
784 enable_spdy_4(false),
783 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize), 785 stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
784 time_func(&base::TimeTicks::Now), 786 time_func(&base::TimeTicks::Now),
785 net_log(NULL) {} 787 net_log(NULL) {}
786 788
787 SpdySessionDependencies::~SpdySessionDependencies() {} 789 SpdySessionDependencies::~SpdySessionDependencies() {}
788 790
789 // static 791 // static
790 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession( 792 HttpNetworkSession* SpdySessionDependencies::SpdyCreateSession(
791 SpdySessionDependencies* session_deps) { 793 SpdySessionDependencies* session_deps) {
792 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps); 794 net::HttpNetworkSession::Params params = CreateSessionParams(session_deps);
(...skipping 25 matching lines...) Expand all
818 params.proxy_service = session_deps->proxy_service.get(); 820 params.proxy_service = session_deps->proxy_service.get();
819 params.ssl_config_service = session_deps->ssl_config_service; 821 params.ssl_config_service = session_deps->ssl_config_service;
820 params.http_auth_handler_factory = 822 params.http_auth_handler_factory =
821 session_deps->http_auth_handler_factory.get(); 823 session_deps->http_auth_handler_factory.get();
822 params.http_server_properties = &session_deps->http_server_properties; 824 params.http_server_properties = &session_deps->http_server_properties;
823 params.enable_spdy_compression = session_deps->enable_compression; 825 params.enable_spdy_compression = session_deps->enable_compression;
824 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping; 826 params.enable_spdy_ping_based_connection_checking = session_deps->enable_ping;
825 params.enable_user_alternate_protocol_ports = 827 params.enable_user_alternate_protocol_ports =
826 session_deps->enable_user_alternate_protocol_ports; 828 session_deps->enable_user_alternate_protocol_ports;
827 params.spdy_default_protocol = 829 params.spdy_default_protocol =
830 session_deps->enable_spdy_4 ? kProtoSPDY4a1 :
828 session_deps->enable_spdy_31 ? kProtoSPDY31 : kProtoSPDY3; 831 session_deps->enable_spdy_31 ? kProtoSPDY31 : kProtoSPDY3;
829 params.spdy_stream_initial_recv_window_size = 832 params.spdy_stream_initial_recv_window_size =
830 session_deps->stream_initial_recv_window_size; 833 session_deps->stream_initial_recv_window_size;
831 params.time_func = session_deps->time_func; 834 params.time_func = session_deps->time_func;
832 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy; 835 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy;
833 params.net_log = session_deps->net_log; 836 params.net_log = session_deps->net_log;
834 return params; 837 return params;
835 } 838 }
836 839
837 SpdyURLRequestContext::SpdyURLRequestContext() 840 SpdyURLRequestContext::SpdyURLRequestContext()
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 NULL, // Data 883 NULL, // Data
881 0, // Length 884 0, // Length
882 DATA_FLAG_NONE // Data Flags 885 DATA_FLAG_NONE // Data Flags
883 }; 886 };
884 return kHeader; 887 return kHeader;
885 } 888 }
886 889
887 } // namespace test_spdy3 890 } // namespace test_spdy3
888 891
889 } // namespace net 892 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy3.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698