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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 STATE_READ_HEADERS_COMPLETE, 137 STATE_READ_HEADERS_COMPLETE,
138 STATE_READ_BODY, 138 STATE_READ_BODY,
139 STATE_READ_BODY_COMPLETE, 139 STATE_READ_BODY_COMPLETE,
140 STATE_DRAIN_BODY_FOR_AUTH_RESTART, 140 STATE_DRAIN_BODY_FOR_AUTH_RESTART,
141 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, 141 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
142 STATE_NONE 142 STATE_NONE
143 }; 143 };
144 144
145 bool is_https_request() const; 145 bool is_https_request() const;
146 146
147 // Returns true if the request is using an HTTP(S) proxy without being
148 // tunneled via the CONNECT method.
149 bool UsingHttpProxyWithoutTunnel() const;
150
147 void DoCallback(int result); 151 void DoCallback(int result);
148 void OnIOComplete(int result); 152 void OnIOComplete(int result);
149 153
150 // Runs the state transition loop. 154 // Runs the state transition loop.
151 int DoLoop(int result); 155 int DoLoop(int result);
152 156
153 // Each of these methods corresponds to a State value. Those with an input 157 // Each of these methods corresponds to a State value. Those with an input
154 // argument receive the result from the previous state. If a method returns 158 // argument receive the result from the previous state. If a method returns
155 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the 159 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the
156 // next state method as the result arg. 160 // next state method as the result arg.
(...skipping 12 matching lines...) Expand all
169 int DoBuildRequestComplete(int result); 173 int DoBuildRequestComplete(int result);
170 int DoSendRequest(); 174 int DoSendRequest();
171 int DoSendRequestComplete(int result); 175 int DoSendRequestComplete(int result);
172 int DoReadHeaders(); 176 int DoReadHeaders();
173 int DoReadHeadersComplete(int result); 177 int DoReadHeadersComplete(int result);
174 int DoReadBody(); 178 int DoReadBody();
175 int DoReadBodyComplete(int result); 179 int DoReadBodyComplete(int result);
176 int DoDrainBodyForAuthRestart(); 180 int DoDrainBodyForAuthRestart();
177 int DoDrainBodyForAuthRestartComplete(int result); 181 int DoDrainBodyForAuthRestartComplete(int result);
178 182
179 void BuildRequestHeaders(bool using_proxy); 183 void BuildRequestHeaders(bool using_http_proxy_without_tunnel);
180 184
181 // Writes a log message to help debugging in the field when we block a proxy 185 // Writes a log message to help debugging in the field when we block a proxy
182 // response to a CONNECT request. 186 // response to a CONNECT request.
183 void LogBlockedTunnelResponse(int response_code) const; 187 void LogBlockedTunnelResponse(int response_code) const;
184 188
185 // Called to handle a client certificate request. 189 // Called to handle a client certificate request.
186 int HandleCertificateRequest(int error); 190 int HandleCertificateRequest(int error);
187 191
188 // Called wherever ERR_HTTP_1_1_REQUIRED or 192 // Called wherever ERR_HTTP_1_1_REQUIRED or
189 // ERR_PROXY_HTTP_1_1_REQUIRED has to be handled. 193 // ERR_PROXY_HTTP_1_1_REQUIRED has to be handled.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 326
323 BeforeNetworkStartCallback before_network_start_callback_; 327 BeforeNetworkStartCallback before_network_start_callback_;
324 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; 328 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_;
325 329
326 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 330 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
327 }; 331 };
328 332
329 } // namespace net 333 } // namespace net
330 334
331 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 335 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698