OLD | NEW |
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_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void SaveCookiesAndNotifyHeadersComplete(int result); | 81 void SaveCookiesAndNotifyHeadersComplete(int result); |
82 void SaveNextCookie(); | 82 void SaveNextCookie(); |
83 void FetchResponseCookies(std::vector<std::string>* cookies); | 83 void FetchResponseCookies(std::vector<std::string>* cookies); |
84 | 84 |
85 // Processes the Strict-Transport-Security header, if one exists. | 85 // Processes the Strict-Transport-Security header, if one exists. |
86 void ProcessStrictTransportSecurityHeader(); | 86 void ProcessStrictTransportSecurityHeader(); |
87 | 87 |
88 // Processes the Public-Key-Pins header, if one exists. | 88 // Processes the Public-Key-Pins header, if one exists. |
89 void ProcessPublicKeyPinsHeader(); | 89 void ProcessPublicKeyPinsHeader(); |
90 | 90 |
91 // TODO(battre) Remove this when crbug.com/289715 is fixed. | |
92 static void OnHeadersReceivedCallbackForDebugging( | |
93 base::WeakPtr<URLRequestHttpJob> job, | |
94 int result); | |
95 | |
96 // |result| should be net::OK, or the request is canceled. | 91 // |result| should be net::OK, or the request is canceled. |
97 void OnHeadersReceivedCallback(int result); | 92 void OnHeadersReceivedCallback(int result); |
98 void OnStartCompleted(int result); | 93 void OnStartCompleted(int result); |
99 void OnReadCompleted(int result); | 94 void OnReadCompleted(int result); |
100 void NotifyBeforeSendHeadersCallback(int result); | 95 void NotifyBeforeSendHeadersCallback(int result); |
101 void NotifyBeforeSendProxyHeadersCallback( | 96 void NotifyBeforeSendProxyHeadersCallback( |
102 const ProxyInfo& proxy_info, | 97 const ProxyInfo& proxy_info, |
103 HttpRequestHeaders* request_headers); | 98 HttpRequestHeaders* request_headers); |
104 | 99 |
105 void RestartTransactionWithAuth(const AuthCredentials& credentials); | 100 void RestartTransactionWithAuth(const AuthCredentials& credentials); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 260 |
266 // Flag used to verify that |this| is not deleted while we are awaiting | 261 // Flag used to verify that |this| is not deleted while we are awaiting |
267 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. | 262 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. |
268 // True if we are waiting a callback and | 263 // True if we are waiting a callback and |
269 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 264 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
270 // to inform the NetworkDelegate that it may not call back. | 265 // to inform the NetworkDelegate that it may not call back. |
271 bool awaiting_callback_; | 266 bool awaiting_callback_; |
272 | 267 |
273 const HttpUserAgentSettings* http_user_agent_settings_; | 268 const HttpUserAgentSettings* http_user_agent_settings_; |
274 | 269 |
275 // TODO(battre) Remove this when crbug.com/289715 is fixed. | |
276 enum TransactionState { | |
277 TRANSACTION_WAS_NOT_INITIALIZED, | |
278 TRANSACTION_WAS_INITIALIZED, | |
279 TRANSACTION_WAS_DESTROYED | |
280 }; | |
281 TransactionState transaction_state_; | |
282 | |
283 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 270 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
284 | 271 |
285 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 272 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
286 }; | 273 }; |
287 | 274 |
288 } // namespace net | 275 } // namespace net |
289 | 276 |
290 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 277 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |