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

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

Issue 6698009: Add request_id to HttpRequestInfo and pass it to the NetworkDelegate for events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net and cache intercept Created 9 years, 9 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 enum State { 88 enum State {
89 STATE_CREATE_STREAM, 89 STATE_CREATE_STREAM,
90 STATE_CREATE_STREAM_COMPLETE, 90 STATE_CREATE_STREAM_COMPLETE,
91 STATE_INIT_STREAM, 91 STATE_INIT_STREAM,
92 STATE_INIT_STREAM_COMPLETE, 92 STATE_INIT_STREAM_COMPLETE,
93 STATE_GENERATE_PROXY_AUTH_TOKEN, 93 STATE_GENERATE_PROXY_AUTH_TOKEN,
94 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE, 94 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE,
95 STATE_GENERATE_SERVER_AUTH_TOKEN, 95 STATE_GENERATE_SERVER_AUTH_TOKEN,
96 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE, 96 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE,
97 STATE_SEND_REQUEST, 97 STATE_SEND_REQUEST,
98 STATE_SEND_REQUEST_INTERCEPT_COMPLETE,
willchan no longer on Chromium 2011/03/17 15:55:54 This is unconventional for net/ state machine logi
Matt Perry 2011/03/22 21:11:43 Done.
98 STATE_SEND_REQUEST_COMPLETE, 99 STATE_SEND_REQUEST_COMPLETE,
99 STATE_READ_HEADERS, 100 STATE_READ_HEADERS,
100 STATE_READ_HEADERS_COMPLETE, 101 STATE_READ_HEADERS_COMPLETE,
101 STATE_READ_BODY, 102 STATE_READ_BODY,
102 STATE_READ_BODY_COMPLETE, 103 STATE_READ_BODY_COMPLETE,
103 STATE_DRAIN_BODY_FOR_AUTH_RESTART, 104 STATE_DRAIN_BODY_FOR_AUTH_RESTART,
104 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, 105 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
105 STATE_NONE 106 STATE_NONE
106 }; 107 };
107 108
(...skipping 11 matching lines...) Expand all
119 // next state method as the result arg. 120 // next state method as the result arg.
120 int DoCreateStream(); 121 int DoCreateStream();
121 int DoCreateStreamComplete(int result); 122 int DoCreateStreamComplete(int result);
122 int DoInitStream(); 123 int DoInitStream();
123 int DoInitStreamComplete(int result); 124 int DoInitStreamComplete(int result);
124 int DoGenerateProxyAuthToken(); 125 int DoGenerateProxyAuthToken();
125 int DoGenerateProxyAuthTokenComplete(int result); 126 int DoGenerateProxyAuthTokenComplete(int result);
126 int DoGenerateServerAuthToken(); 127 int DoGenerateServerAuthToken();
127 int DoGenerateServerAuthTokenComplete(int result); 128 int DoGenerateServerAuthTokenComplete(int result);
128 int DoSendRequest(); 129 int DoSendRequest();
130 int DoSendRequestInterceptComplete(int result);
129 int DoSendRequestComplete(int result); 131 int DoSendRequestComplete(int result);
130 int DoReadHeaders(); 132 int DoReadHeaders();
131 int DoReadHeadersComplete(int result); 133 int DoReadHeadersComplete(int result);
132 int DoReadBody(); 134 int DoReadBody();
133 int DoReadBodyComplete(int result); 135 int DoReadBodyComplete(int result);
134 int DoDrainBodyForAuthRestart(); 136 int DoDrainBodyForAuthRestart();
135 int DoDrainBodyForAuthRestartComplete(int result); 137 int DoDrainBodyForAuthRestartComplete(int result);
136 138
137 // Record histogram of time until first byte of header is received. 139 // Record histogram of time until first byte of header is received.
138 void LogTransactionConnectedMetrics(); 140 void LogTransactionConnectedMetrics();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 scoped_refptr<HttpAuthController> 213 scoped_refptr<HttpAuthController>
212 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; 214 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS];
213 215
214 // Whether this transaction is waiting for proxy auth, server auth, or is 216 // Whether this transaction is waiting for proxy auth, server auth, or is
215 // not waiting for any auth at all. |pending_auth_target_| is read and 217 // not waiting for any auth at all. |pending_auth_target_| is read and
216 // cleared by RestartWithAuth(). 218 // cleared by RestartWithAuth().
217 HttpAuth::Target pending_auth_target_; 219 HttpAuth::Target pending_auth_target_;
218 220
219 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; 221 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_;
220 CompletionCallback* user_callback_; 222 CompletionCallback* user_callback_;
223 scoped_ptr<UploadDataStream> request_body_;
221 224
222 scoped_refptr<HttpNetworkSession> session_; 225 scoped_refptr<HttpNetworkSession> session_;
223 226
224 BoundNetLog net_log_; 227 BoundNetLog net_log_;
225 const HttpRequestInfo* request_; 228 const HttpRequestInfo* request_;
226 HttpResponseInfo response_; 229 HttpResponseInfo response_;
227 230
228 // |proxy_info_| is the ProxyInfo used by the HttpStreamRequest. 231 // |proxy_info_| is the ProxyInfo used by the HttpStreamRequest.
229 ProxyInfo proxy_info_; 232 ProxyInfo proxy_info_;
230 233
(...skipping 30 matching lines...) Expand all
261 // True when the tunnel is in the process of being established - we can't 264 // True when the tunnel is in the process of being established - we can't
262 // read from the socket until the tunnel is done. 265 // read from the socket until the tunnel is done.
263 bool establishing_tunnel_; 266 bool establishing_tunnel_;
264 267
265 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 268 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
266 }; 269 };
267 270
268 } // namespace net 271 } // namespace net
269 272
270 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 273 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698