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

Side by Side Diff: net/base/test_proxy_delegate.h

Issue 2260623002: Race TCP connection to proxies with QUIC connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 4 years, 3 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
« no previous file with comments | « net/base/proxy_delegate.h ('k') | net/base/test_proxy_delegate.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BASE_TEST_PROXY_DELEGATE_H_ 5 #ifndef NET_BASE_TEST_PROXY_DELEGATE_H_
6 #define NET_BASE_TEST_PROXY_DELEGATE_H_ 6 #define NET_BASE_TEST_PROXY_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/host_port_pair.h" 10 #include "net/base/host_port_pair.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const HostPortPair& proxy_server, 58 const HostPortPair& proxy_server,
59 int net_error) override; 59 int net_error) override;
60 void OnFallback(const ProxyServer& bad_proxy, int net_error) override; 60 void OnFallback(const ProxyServer& bad_proxy, int net_error) override;
61 void OnBeforeTunnelRequest(const HostPortPair& proxy_server, 61 void OnBeforeTunnelRequest(const HostPortPair& proxy_server,
62 HttpRequestHeaders* extra_headers) override; 62 HttpRequestHeaders* extra_headers) override;
63 void OnTunnelHeadersReceived( 63 void OnTunnelHeadersReceived(
64 const HostPortPair& origin, 64 const HostPortPair& origin,
65 const HostPortPair& proxy_server, 65 const HostPortPair& proxy_server,
66 const HttpResponseHeaders& response_headers) override; 66 const HttpResponseHeaders& response_headers) override;
67 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override; 67 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override;
68 void GetAlternativeProxy(
69 const GURL& url,
70 const ProxyServer& resolved_proxy_server,
71 ProxyServer* alternative_proxy_server) const override;
72 void OnAlternativeProxyBroken(
73 const ProxyServer& alternative_proxy_server) override;
74
75 void set_alternative_proxy_server(
76 const ProxyServer& alternative_proxy_server) {
77 alternative_proxy_server_ = alternative_proxy_server;
78 }
79 const ProxyServer& alternative_proxy_server() const {
80 return alternative_proxy_server_;
81 }
82
83 int get_alternative_proxy_invocations() const {
84 return get_alternative_proxy_invocations_;
85 }
68 86
69 private: 87 private:
70 bool on_before_tunnel_request_called_; 88 bool on_before_tunnel_request_called_;
71 bool on_tunnel_request_completed_called_; 89 bool on_tunnel_request_completed_called_;
72 bool on_tunnel_headers_received_called_; 90 bool on_tunnel_headers_received_called_;
73 net::ProxyServer trusted_spdy_proxy_; 91 net::ProxyServer trusted_spdy_proxy_;
74 HostPortPair on_tunnel_request_completed_endpoint_; 92 HostPortPair on_tunnel_request_completed_endpoint_;
75 HostPortPair on_tunnel_request_completed_proxy_server_; 93 HostPortPair on_tunnel_request_completed_proxy_server_;
76 HostPortPair on_tunnel_headers_received_origin_; 94 HostPortPair on_tunnel_headers_received_origin_;
77 HostPortPair on_tunnel_headers_received_proxy_server_; 95 HostPortPair on_tunnel_headers_received_proxy_server_;
78 std::string on_tunnel_headers_received_status_line_; 96 std::string on_tunnel_headers_received_status_line_;
97 ProxyServer alternative_proxy_server_;
98
99 // Number of times GetAlternativeProxy() method has been called.
100 mutable int get_alternative_proxy_invocations_;
79 }; 101 };
80 102
81 } // namespace net 103 } // namespace net
82 104
83 #endif // NET_BASE_TEST_PROXY_DELEGATE_H_ 105 #endif // NET_BASE_TEST_PROXY_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/base/proxy_delegate.h ('k') | net/base/test_proxy_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698