OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TRANSACTION_UNITTEST_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
7 | 7 |
8 #include "net/http/http_transaction.h" | 8 #include "net/http/http_transaction.h" |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/load_flags.h" | 19 #include "net/base/load_flags.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
22 #include "net/base/test_completion_callback.h" | 22 #include "net/base/test_completion_callback.h" |
23 #include "net/disk_cache/disk_cache.h" | 23 #include "net/disk_cache/disk_cache.h" |
24 #include "net/http/http_cache.h" | 24 #include "net/http/http_cache.h" |
25 #include "net/http/http_request_info.h" | 25 #include "net/http/http_request_info.h" |
26 #include "net/http/http_response_headers.h" | 26 #include "net/http/http_response_headers.h" |
27 #include "net/http/http_response_info.h" | 27 #include "net/http/http_response_info.h" |
28 #include "net/log/net_log.h" | 28 #include "net/log/net_log.h" |
29 #include "net/socket/connection_attempts.h" | 29 #include "net/socket/connection_attempts.h" |
30 #include "net/ssl/ssl_private_key.h" | |
davidben
2015/09/25 20:10:11
Forward decl / unnecessary because HttpTransaction
svaldez
2015/09/28 16:54:52
Done.
| |
30 | 31 |
31 namespace net { | 32 namespace net { |
32 | 33 |
33 class HttpRequestHeaders; | 34 class HttpRequestHeaders; |
34 class IOBuffer; | 35 class IOBuffer; |
35 class X509Certificate; | 36 class X509Certificate; |
36 struct HttpRequestInfo; | 37 struct HttpRequestInfo; |
37 | 38 |
38 //----------------------------------------------------------------------------- | 39 //----------------------------------------------------------------------------- |
39 // mock transaction data | 40 // mock transaction data |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 MockNetworkTransaction(RequestPriority priority, MockNetworkLayer* factory); | 176 MockNetworkTransaction(RequestPriority priority, MockNetworkLayer* factory); |
176 ~MockNetworkTransaction() override; | 177 ~MockNetworkTransaction() override; |
177 | 178 |
178 int Start(const HttpRequestInfo* request, | 179 int Start(const HttpRequestInfo* request, |
179 const CompletionCallback& callback, | 180 const CompletionCallback& callback, |
180 const BoundNetLog& net_log) override; | 181 const BoundNetLog& net_log) override; |
181 | 182 |
182 int RestartIgnoringLastError(const CompletionCallback& callback) override; | 183 int RestartIgnoringLastError(const CompletionCallback& callback) override; |
183 | 184 |
184 int RestartWithCertificate(X509Certificate* client_cert, | 185 int RestartWithCertificate(X509Certificate* client_cert, |
186 SSLPrivateKey* client_pkey, | |
185 const CompletionCallback& callback) override; | 187 const CompletionCallback& callback) override; |
186 | 188 |
187 int RestartWithAuth(const AuthCredentials& credentials, | 189 int RestartWithAuth(const AuthCredentials& credentials, |
188 const CompletionCallback& callback) override; | 190 const CompletionCallback& callback) override; |
189 | 191 |
190 bool IsReadyToRestartForAuth() override; | 192 bool IsReadyToRestartForAuth() override; |
191 | 193 |
192 int Read(IOBuffer* buf, | 194 int Read(IOBuffer* buf, |
193 int buf_len, | 195 int buf_len, |
194 const CompletionCallback& callback) override; | 196 const CompletionCallback& callback) override; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 | 331 |
330 //----------------------------------------------------------------------------- | 332 //----------------------------------------------------------------------------- |
331 // helpers | 333 // helpers |
332 | 334 |
333 // read the transaction completely | 335 // read the transaction completely |
334 int ReadTransaction(HttpTransaction* trans, std::string* result); | 336 int ReadTransaction(HttpTransaction* trans, std::string* result); |
335 | 337 |
336 } // namespace net | 338 } // namespace net |
337 | 339 |
338 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 340 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |