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

Side by Side Diff: net/spdy/spdy_test_util_spdy2.h

Issue 11415219: Move a number of static variables SPDY to HttpNetworkSession::Params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar cleanup Created 8 years 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) 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_TEST_UTIL_H_ 6 #define NET_SPDY_SPDY_TEST_UTIL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "net/base/cert_verifier.h" 9 #include "net/base/cert_verifier.h"
10 #include "net/base/host_port_pair.h" 10 #include "net/base/host_port_pair.h"
11 #include "net/base/mock_host_resolver.h" 11 #include "net/base/mock_host_resolver.h"
12 #include "net/base/request_priority.h" 12 #include "net/base/request_priority.h"
13 #include "net/base/ssl_config_service_defaults.h" 13 #include "net/base/ssl_config_service_defaults.h"
14 #include "net/http/http_auth_handler_factory.h" 14 #include "net/http/http_auth_handler_factory.h"
15 #include "net/http/http_cache.h" 15 #include "net/http/http_cache.h"
16 #include "net/http/http_network_session.h" 16 #include "net/http/http_network_session.h"
17 #include "net/http/http_network_layer.h" 17 #include "net/http/http_network_layer.h"
18 #include "net/http/http_server_properties_impl.h" 18 #include "net/http/http_server_properties_impl.h"
19 #include "net/http/http_transaction_factory.h" 19 #include "net/http/http_transaction_factory.h"
20 #include "net/proxy/proxy_service.h" 20 #include "net/proxy/proxy_service.h"
21 #include "net/socket/socket_test_util.h" 21 #include "net/socket/socket_test_util.h"
22 #include "net/spdy/spdy_session.h"
22 #include "net/url_request/url_request_context.h" 23 #include "net/url_request/url_request_context.h"
23 #include "net/url_request/url_request_context_storage.h" 24 #include "net/url_request/url_request_context_storage.h"
24 25
25 namespace net { 26 namespace net {
26 27
27 namespace test_spdy2 { 28 namespace test_spdy2 {
28 29
29 // Default upload data used by both, mock objects and framer when creating 30 // Default upload data used by both, mock objects and framer when creating
30 // data frames. 31 // data frames.
31 const char kDefaultURL[] = "http://www.google.com"; 32 const char kDefaultURL[] = "http://www.google.com";
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 359
359 // NOTE: host_resolver must be ordered before http_auth_handler_factory. 360 // NOTE: host_resolver must be ordered before http_auth_handler_factory.
360 scoped_ptr<MockHostResolverBase> host_resolver; 361 scoped_ptr<MockHostResolverBase> host_resolver;
361 scoped_ptr<CertVerifier> cert_verifier; 362 scoped_ptr<CertVerifier> cert_verifier;
362 scoped_ptr<ProxyService> proxy_service; 363 scoped_ptr<ProxyService> proxy_service;
363 scoped_refptr<SSLConfigService> ssl_config_service; 364 scoped_refptr<SSLConfigService> ssl_config_service;
364 scoped_ptr<MockClientSocketFactory> socket_factory; 365 scoped_ptr<MockClientSocketFactory> socket_factory;
365 scoped_ptr<DeterministicMockClientSocketFactory> deterministic_socket_factory; 366 scoped_ptr<DeterministicMockClientSocketFactory> deterministic_socket_factory;
366 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory; 367 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory;
367 HttpServerPropertiesImpl http_server_properties; 368 HttpServerPropertiesImpl http_server_properties;
369 bool enable_ip_pooling;
370 bool enable_compression;
371 bool enable_ping;
372 SpdySession::TimeFunc time_func;
368 std::string trusted_spdy_proxy; 373 std::string trusted_spdy_proxy;
369 NetLog* net_log; 374 NetLog* net_log;
370 }; 375 };
371 376
372 class SpdyURLRequestContext : public URLRequestContext { 377 class SpdyURLRequestContext : public URLRequestContext {
373 public: 378 public:
374 SpdyURLRequestContext(); 379 SpdyURLRequestContext();
375 virtual ~SpdyURLRequestContext(); 380 virtual ~SpdyURLRequestContext();
376 381
377 MockClientSocketFactory& socket_factory() { return socket_factory_; } 382 MockClientSocketFactory& socket_factory() { return socket_factory_; }
(...skipping 29 matching lines...) Expand all
407 void EnableSendingInitialSettings(bool enabled) { 412 void EnableSendingInitialSettings(bool enabled) {
408 pool_->enable_sending_initial_settings_ = enabled; 413 pool_->enable_sending_initial_settings_ = enabled;
409 } 414 }
410 415
411 private: 416 private:
412 SpdySessionPool* const pool_; 417 SpdySessionPool* const pool_;
413 418
414 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); 419 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer);
415 }; 420 };
416 421
417 // Helper to manage the state of a number of SPDY global variables.
418 class SpdyTestStateHelper {
419 public:
420 SpdyTestStateHelper();
421 ~SpdyTestStateHelper();
422
423 private:
424 DISALLOW_COPY_AND_ASSIGN(SpdyTestStateHelper);
425 };
426
427 } // namespace test_spdy2 422 } // namespace test_spdy2
428 423
429 } // namespace net 424 } // namespace net
430 425
431 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ 426 #endif // NET_SPDY_SPDY_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698