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

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

Issue 1110012: Revert r42300: "HttpRequestHeaders refactor." (Closed)
Patch Set: Created 10 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
« no previous file with comments | « base/string_util_unittest.cc ('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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 #include "net/proxy/proxy_service.h" 26 #include "net/proxy/proxy_service.h"
27 #include "net/socket/client_socket_pool.h" 27 #include "net/socket/client_socket_pool.h"
28 #include "testing/gtest/include/gtest/gtest_prod.h" 28 #include "testing/gtest/include/gtest/gtest_prod.h"
29 29
30 namespace net { 30 namespace net {
31 31
32 class ClientSocketFactory; 32 class ClientSocketFactory;
33 class ClientSocketHandle; 33 class ClientSocketHandle;
34 class SpdyStream; 34 class SpdyStream;
35 class HttpNetworkSession; 35 class HttpNetworkSession;
36 class HttpRequestHeaders;
37 class HttpStream; 36 class HttpStream;
38 37
39 class HttpNetworkTransaction : public HttpTransaction { 38 class HttpNetworkTransaction : public HttpTransaction {
40 public: 39 public:
41 explicit HttpNetworkTransaction(HttpNetworkSession* session); 40 explicit HttpNetworkTransaction(HttpNetworkSession* session);
42 41
43 virtual ~HttpNetworkTransaction(); 42 virtual ~HttpNetworkTransaction();
44 43
45 // Sets the next protocol negotiation value used during the SSL handshake. 44 // Sets the next protocol negotiation value used during the SSL handshake.
46 static void SetNextProtos(const std::string& next_protos); 45 static void SetNextProtos(const std::string& next_protos);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 207
209 // Resets the members of the transaction so it can be restarted. 208 // Resets the members of the transaction so it can be restarted.
210 void ResetStateForRestart(); 209 void ResetStateForRestart();
211 210
212 // Returns true if we should try to add a Proxy-Authorization header 211 // Returns true if we should try to add a Proxy-Authorization header
213 bool ShouldApplyProxyAuth() const; 212 bool ShouldApplyProxyAuth() const;
214 213
215 // Returns true if we should try to add an Authorization header. 214 // Returns true if we should try to add an Authorization header.
216 bool ShouldApplyServerAuth() const; 215 bool ShouldApplyServerAuth() const;
217 216
218 // Adds either the proxy auth header, or the origin server auth header, 217 // Builds either the proxy auth header, or the origin server auth header,
219 // as specified by |target|. 218 // as specified by |target|.
220 void AddAuthorizationHeader( 219 std::string BuildAuthorizationHeader(HttpAuth::Target target) const;
221 HttpAuth::Target target, HttpRequestHeaders* authorization_headers) const;
222 220
223 // Returns a log message for all the response headers related to the auth 221 // Returns a log message for all the response headers related to the auth
224 // challenge. 222 // challenge.
225 std::string AuthChallengeLogMessage() const; 223 std::string AuthChallengeLogMessage() const;
226 224
227 // Handles HTTP status code 401 or 407. 225 // Handles HTTP status code 401 or 407.
228 // HandleAuthChallenge() returns a network error code, or OK on success. 226 // HandleAuthChallenge() returns a network error code, or OK on success.
229 // May update |pending_auth_target_| or |response_.auth_challenge|. 227 // May update |pending_auth_target_| or |response_.auth_challenge|.
230 int HandleAuthChallenge(); 228 int HandleAuthChallenge();
231 229
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // The time the DoSSLConnect() method was called (if it got called). 354 // The time the DoSSLConnect() method was called (if it got called).
357 base::TimeTicks ssl_connect_start_time_; 355 base::TimeTicks ssl_connect_start_time_;
358 356
359 // The next state in the state machine. 357 // The next state in the state machine.
360 State next_state_; 358 State next_state_;
361 }; 359 };
362 360
363 } // namespace net 361 } // namespace net
364 362
365 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 363 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « base/string_util_unittest.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698