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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual void SetAuth(const AuthCredentials& credentials) OVERRIDE; | 84 virtual void SetAuth(const AuthCredentials& credentials) OVERRIDE; |
85 virtual void CancelAuth() OVERRIDE; | 85 virtual void CancelAuth() OVERRIDE; |
86 virtual void ContinueWithCertificate(X509Certificate* client_cert) OVERRIDE; | 86 virtual void ContinueWithCertificate(X509Certificate* client_cert) OVERRIDE; |
87 virtual void ContinueDespiteLastError() OVERRIDE; | 87 virtual void ContinueDespiteLastError() OVERRIDE; |
88 virtual bool ReadRawData(IOBuffer* buf, int buf_size, | 88 virtual bool ReadRawData(IOBuffer* buf, int buf_size, |
89 int* bytes_read) OVERRIDE; | 89 int* bytes_read) OVERRIDE; |
90 virtual void StopCaching() OVERRIDE; | 90 virtual void StopCaching() OVERRIDE; |
91 virtual void DoneReading() OVERRIDE; | 91 virtual void DoneReading() OVERRIDE; |
92 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 92 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
93 virtual void NotifyURLRequestDestroyed() OVERRIDE; | 93 virtual void NotifyURLRequestDestroyed() OVERRIDE; |
| 94 virtual void OnDetachRequest() OVERRIDE; |
94 | 95 |
95 HttpRequestInfo request_info_; | 96 HttpRequestInfo request_info_; |
96 const HttpResponseInfo* response_info_; | 97 const HttpResponseInfo* response_info_; |
97 | 98 |
98 std::vector<std::string> response_cookies_; | 99 std::vector<std::string> response_cookies_; |
99 size_t response_cookies_save_index_; | 100 size_t response_cookies_save_index_; |
100 base::Time response_date_; | 101 base::Time response_date_; |
101 | 102 |
102 // Auth states for proxy and origin server. | 103 // Auth states for proxy and origin server. |
103 AuthState proxy_auth_state_; | 104 AuthState proxy_auth_state_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 private: | 137 private: |
137 enum CompletionCause { | 138 enum CompletionCause { |
138 ABORTED, | 139 ABORTED, |
139 FINISHED | 140 FINISHED |
140 }; | 141 }; |
141 | 142 |
142 typedef base::RefCountedData<bool> SharedBoolean; | 143 typedef base::RefCountedData<bool> SharedBoolean; |
143 | 144 |
144 class HttpFilterContext; | 145 class HttpFilterContext; |
| 146 class HttpTransactionDelegateImpl; |
145 | 147 |
146 virtual ~URLRequestHttpJob(); | 148 virtual ~URLRequestHttpJob(); |
147 | 149 |
148 void RecordTimer(); | 150 void RecordTimer(); |
149 void ResetTimer(); | 151 void ResetTimer(); |
150 | 152 |
151 virtual void UpdatePacketReadTimes() OVERRIDE; | 153 virtual void UpdatePacketReadTimes() OVERRIDE; |
152 void RecordPacketStats(FilterContext::StatisticSelector statistic) const; | 154 void RecordPacketStats(FilterContext::StatisticSelector statistic) const; |
153 | 155 |
154 void RecordCompressionHistograms(); | 156 void RecordCompressionHistograms(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // layers of the network stack. | 229 // layers of the network stack. |
228 scoped_refptr<HttpResponseHeaders> override_response_headers_; | 230 scoped_refptr<HttpResponseHeaders> override_response_headers_; |
229 | 231 |
230 // Flag used to verify that |this| is not deleted while we are awaiting | 232 // Flag used to verify that |this| is not deleted while we are awaiting |
231 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. | 233 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. |
232 // True if we are waiting a callback and | 234 // True if we are waiting a callback and |
233 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 235 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
234 // to inform the NetworkDelegate that it may not call back. | 236 // to inform the NetworkDelegate that it may not call back. |
235 bool awaiting_callback_; | 237 bool awaiting_callback_; |
236 | 238 |
| 239 scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_; |
| 240 |
237 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 241 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
238 }; | 242 }; |
239 | 243 |
240 } // namespace net | 244 } // namespace net |
241 | 245 |
242 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 246 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |