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>, | |
94 int); | |
mmenke
2015/01/09 18:04:21
Should name arguments in declaration.
battre
2015/01/09 18:05:43
Done.
| |
95 | |
91 // |result| should be net::OK, or the request is canceled. | 96 // |result| should be net::OK, or the request is canceled. |
92 void OnHeadersReceivedCallback(int result); | 97 void OnHeadersReceivedCallback(int result); |
93 void OnStartCompleted(int result); | 98 void OnStartCompleted(int result); |
94 void OnReadCompleted(int result); | 99 void OnReadCompleted(int result); |
95 void NotifyBeforeSendHeadersCallback(int result); | 100 void NotifyBeforeSendHeadersCallback(int result); |
96 void NotifyBeforeSendProxyHeadersCallback( | 101 void NotifyBeforeSendProxyHeadersCallback( |
97 const ProxyInfo& proxy_info, | 102 const ProxyInfo& proxy_info, |
98 HttpRequestHeaders* request_headers); | 103 HttpRequestHeaders* request_headers); |
99 | 104 |
100 void RestartTransactionWithAuth(const AuthCredentials& credentials); | 105 void RestartTransactionWithAuth(const AuthCredentials& credentials); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 | 265 |
261 // Flag used to verify that |this| is not deleted while we are awaiting | 266 // Flag used to verify that |this| is not deleted while we are awaiting |
262 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. | 267 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. |
263 // True if we are waiting a callback and | 268 // True if we are waiting a callback and |
264 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 269 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
265 // to inform the NetworkDelegate that it may not call back. | 270 // to inform the NetworkDelegate that it may not call back. |
266 bool awaiting_callback_; | 271 bool awaiting_callback_; |
267 | 272 |
268 const HttpUserAgentSettings* http_user_agent_settings_; | 273 const HttpUserAgentSettings* http_user_agent_settings_; |
269 | 274 |
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 | |
270 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 283 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
271 | 284 |
272 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 285 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
273 }; | 286 }; |
274 | 287 |
275 } // namespace net | 288 } // namespace net |
276 | 289 |
277 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 290 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |