OLD | NEW |
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/http/http_stream_factory_impl_request.h" | 5 #include "net/http/http_stream_factory_impl_request.h" |
6 | 6 |
7 #include "net/http/http_stream_factory_impl_job.h" | 7 #include "net/http/http_stream_factory_impl_job.h" |
8 #include "net/proxy/proxy_info.h" | 8 #include "net/proxy/proxy_info.h" |
9 #include "net/proxy/proxy_service.h" | 9 #include "net/proxy/proxy_service.h" |
10 #include "net/spdy/spdy_test_util_common.h" | 10 #include "net/spdy/spdy_test_util_common.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class DoNothingRequestDelegate : public HttpStreamRequest::Delegate { | 27 class DoNothingRequestDelegate : public HttpStreamRequest::Delegate { |
28 public: | 28 public: |
29 DoNothingRequestDelegate() {} | 29 DoNothingRequestDelegate() {} |
30 | 30 |
31 virtual ~DoNothingRequestDelegate() {} | 31 virtual ~DoNothingRequestDelegate() {} |
32 | 32 |
33 // HttpStreamRequest::Delegate | 33 // HttpStreamRequest::Delegate |
34 virtual void OnStreamReady( | 34 virtual void OnStreamReady( |
35 const SSLConfig& used_ssl_config, | 35 const SSLConfig& used_ssl_config, |
36 const ProxyInfo& used_proxy_info, | 36 const ProxyInfo& used_proxy_info, |
37 HttpStreamBase* stream) OVERRIDE {} | 37 HttpStreamBase* stream) override {} |
38 virtual void OnWebSocketHandshakeStreamReady( | 38 virtual void OnWebSocketHandshakeStreamReady( |
39 const SSLConfig& used_ssl_config, | 39 const SSLConfig& used_ssl_config, |
40 const ProxyInfo& used_proxy_info, | 40 const ProxyInfo& used_proxy_info, |
41 WebSocketHandshakeStreamBase* stream) OVERRIDE {} | 41 WebSocketHandshakeStreamBase* stream) override {} |
42 virtual void OnStreamFailed( | 42 virtual void OnStreamFailed( |
43 int status, | 43 int status, |
44 const SSLConfig& used_ssl_config) OVERRIDE {} | 44 const SSLConfig& used_ssl_config) override {} |
45 virtual void OnCertificateError( | 45 virtual void OnCertificateError( |
46 int status, | 46 int status, |
47 const SSLConfig& used_ssl_config, | 47 const SSLConfig& used_ssl_config, |
48 const SSLInfo& ssl_info) OVERRIDE {} | 48 const SSLInfo& ssl_info) override {} |
49 virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response, | 49 virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response, |
50 const SSLConfig& used_ssl_config, | 50 const SSLConfig& used_ssl_config, |
51 const ProxyInfo& used_proxy_info, | 51 const ProxyInfo& used_proxy_info, |
52 HttpAuthController* auth_controller) OVERRIDE {} | 52 HttpAuthController* auth_controller) override {} |
53 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, | 53 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, |
54 SSLCertRequestInfo* cert_info) OVERRIDE {} | 54 SSLCertRequestInfo* cert_info) override {} |
55 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, | 55 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, |
56 const SSLConfig& used_ssl_config, | 56 const SSLConfig& used_ssl_config, |
57 const ProxyInfo& used_proxy_info, | 57 const ProxyInfo& used_proxy_info, |
58 HttpStreamBase* stream) OVERRIDE {} | 58 HttpStreamBase* stream) override {} |
59 }; | 59 }; |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 // Make sure that Request passes on its priority updates to its jobs. | 63 // Make sure that Request passes on its priority updates to its jobs. |
64 TEST_P(HttpStreamFactoryImplRequestTest, SetPriority) { | 64 TEST_P(HttpStreamFactoryImplRequestTest, SetPriority) { |
65 SpdySessionDependencies session_deps(GetParam(), | 65 SpdySessionDependencies session_deps(GetParam(), |
66 ProxyService::CreateDirect()); | 66 ProxyService::CreateDirect()); |
67 | 67 |
68 scoped_refptr<HttpNetworkSession> | 68 scoped_refptr<HttpNetworkSession> |
(...skipping 20 matching lines...) Expand all Loading... |
89 EXPECT_EQ(MEDIUM, job->priority()); | 89 EXPECT_EQ(MEDIUM, job->priority()); |
90 | 90 |
91 // Make |job| the bound job. | 91 // Make |job| the bound job. |
92 request.OnStreamFailed(job, ERR_FAILED, SSLConfig()); | 92 request.OnStreamFailed(job, ERR_FAILED, SSLConfig()); |
93 | 93 |
94 request.SetPriority(IDLE); | 94 request.SetPriority(IDLE); |
95 EXPECT_EQ(IDLE, job->priority()); | 95 EXPECT_EQ(IDLE, job->priority()); |
96 } | 96 } |
97 | 97 |
98 } // namespace net | 98 } // namespace net |
OLD | NEW |