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

Side by Side Diff: net/http/http_network_transaction.h

Issue 3056040: Revert 54405 - Fix late binding induced mismatch of Socket and AuthController... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/base/net_error_list.h ('k') | net/http/http_network_transaction.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_HTTP_HTTP_NETWORK_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual uint64 GetUploadProgress() const; 84 virtual uint64 GetUploadProgress() const;
85 85
86 private: 86 private:
87 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart); 87 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart);
88 88
89 enum State { 89 enum State {
90 STATE_RESOLVE_PROXY, 90 STATE_RESOLVE_PROXY,
91 STATE_RESOLVE_PROXY_COMPLETE, 91 STATE_RESOLVE_PROXY_COMPLETE,
92 STATE_INIT_CONNECTION, 92 STATE_INIT_CONNECTION,
93 STATE_INIT_CONNECTION_COMPLETE, 93 STATE_INIT_CONNECTION_COMPLETE,
94 STATE_RESTART_TUNNEL_AUTH,
95 STATE_RESTART_TUNNEL_AUTH_COMPLETE,
96 STATE_GENERATE_PROXY_AUTH_TOKEN, 94 STATE_GENERATE_PROXY_AUTH_TOKEN,
97 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE, 95 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE,
98 STATE_GENERATE_SERVER_AUTH_TOKEN, 96 STATE_GENERATE_SERVER_AUTH_TOKEN,
99 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE, 97 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE,
100 STATE_SEND_REQUEST, 98 STATE_SEND_REQUEST,
101 STATE_SEND_REQUEST_COMPLETE, 99 STATE_SEND_REQUEST_COMPLETE,
102 STATE_READ_HEADERS, 100 STATE_READ_HEADERS,
103 STATE_READ_HEADERS_COMPLETE, 101 STATE_READ_HEADERS_COMPLETE,
104 STATE_READ_BODY, 102 STATE_READ_BODY,
105 STATE_READ_BODY_COMPLETE, 103 STATE_READ_BODY_COMPLETE,
(...skipping 23 matching lines...) Expand all
129 int DoLoop(int result); 127 int DoLoop(int result);
130 128
131 // Each of these methods corresponds to a State value. Those with an input 129 // Each of these methods corresponds to a State value. Those with an input
132 // argument receive the result from the previous state. If a method returns 130 // argument receive the result from the previous state. If a method returns
133 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the 131 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the
134 // next state method as the result arg. 132 // next state method as the result arg.
135 int DoResolveProxy(); 133 int DoResolveProxy();
136 int DoResolveProxyComplete(int result); 134 int DoResolveProxyComplete(int result);
137 int DoInitConnection(); 135 int DoInitConnection();
138 int DoInitConnectionComplete(int result); 136 int DoInitConnectionComplete(int result);
139 int DoRestartTunnelAuth();
140 int DoRestartTunnelAuthComplete(int result);
141 int DoGenerateProxyAuthToken(); 137 int DoGenerateProxyAuthToken();
142 int DoGenerateProxyAuthTokenComplete(int result); 138 int DoGenerateProxyAuthTokenComplete(int result);
143 int DoGenerateServerAuthToken(); 139 int DoGenerateServerAuthToken();
144 int DoGenerateServerAuthTokenComplete(int result); 140 int DoGenerateServerAuthTokenComplete(int result);
145 int DoSendRequest(); 141 int DoSendRequest();
146 int DoSendRequestComplete(int result); 142 int DoSendRequestComplete(int result);
147 int DoReadHeaders(); 143 int DoReadHeaders();
148 int DoReadHeadersComplete(int result); 144 int DoReadHeadersComplete(int result);
149 int DoReadBody(); 145 int DoReadBody();
150 int DoReadBodyComplete(int result); 146 int DoReadBodyComplete(int result);
(...skipping 16 matching lines...) Expand all
167 163
168 // Record histogram of latency (durations until last byte received). 164 // Record histogram of latency (durations until last byte received).
169 void LogTransactionMetrics() const; 165 void LogTransactionMetrics() const;
170 166
171 // Writes a log message to help debugging in the field when we block a proxy 167 // Writes a log message to help debugging in the field when we block a proxy
172 // response to a CONNECT request. 168 // response to a CONNECT request.
173 void LogBlockedTunnelResponse(int response_code) const; 169 void LogBlockedTunnelResponse(int response_code) const;
174 170
175 static void LogIOErrorMetrics(const ClientSocketHandle& handle); 171 static void LogIOErrorMetrics(const ClientSocketHandle& handle);
176 172
177 // Called to handle an HTTP proxy tunnel request for auth.
178 int HandleTunnelAuthFailure(int error);
179
180 // Called to handle a certificate error. Returns OK if the error should be 173 // Called to handle a certificate error. Returns OK if the error should be
181 // ignored. Otherwise, stores the certificate in response_.ssl_info and 174 // ignored. Otherwise, stores the certificate in response_.ssl_info and
182 // returns the same error code. 175 // returns the same error code.
183 int HandleCertificateError(int error); 176 int HandleCertificateError(int error);
184 177
185 // Called to handle a client certificate request. 178 // Called to handle a client certificate request.
186 int HandleCertificateRequest(int error); 179 int HandleCertificateRequest(int error);
187 180
188 // Called to possibly recover from an SSL handshake error. Sets next_state_ 181 // Called to possibly recover from an SSL handshake error. Sets next_state_
189 // and returns OK if recovering from the error. Otherwise, the same error 182 // and returns OK if recovering from the error. Otherwise, the same error
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 bool establishing_tunnel_; 331 bool establishing_tunnel_;
339 332
340 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 333 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
341 }; 334 };
342 335
343 int ConvertRequestPriorityToSpdyPriority(RequestPriority priority); 336 int ConvertRequestPriorityToSpdyPriority(RequestPriority priority);
344 337
345 } // namespace net 338 } // namespace net
346 339
347 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 340 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698