| 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_TEST_UTIL_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_TEST_UTIL_H_ |
| 6 #define NET_HTTP_HTTP_TRANSACTION_TEST_UTIL_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_TEST_UTIL_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> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 public: | 182 public: |
| 183 MockNetworkTransaction(RequestPriority priority, MockNetworkLayer* factory); | 183 MockNetworkTransaction(RequestPriority priority, MockNetworkLayer* factory); |
| 184 ~MockNetworkTransaction() override; | 184 ~MockNetworkTransaction() override; |
| 185 | 185 |
| 186 int Start(const HttpRequestInfo* request, | 186 int Start(const HttpRequestInfo* request, |
| 187 const CompletionCallback& callback, | 187 const CompletionCallback& callback, |
| 188 const NetLogWithSource& net_log) override; | 188 const NetLogWithSource& net_log) override; |
| 189 | 189 |
| 190 int RestartIgnoringLastError(const CompletionCallback& callback) override; | 190 int RestartIgnoringLastError(const CompletionCallback& callback) override; |
| 191 | 191 |
| 192 int RestartWithCertificate(X509Certificate* client_cert, | 192 int RestartWithCertificate(scoped_refptr<X509Certificate> client_cert, |
| 193 SSLPrivateKey* client_private_key, | 193 scoped_refptr<SSLPrivateKey> client_private_key, |
| 194 const CompletionCallback& callback) override; | 194 const CompletionCallback& callback) override; |
| 195 | 195 |
| 196 int RestartWithAuth(const AuthCredentials& credentials, | 196 int RestartWithAuth(const AuthCredentials& credentials, |
| 197 const CompletionCallback& callback) override; | 197 const CompletionCallback& callback) override; |
| 198 | 198 |
| 199 bool IsReadyToRestartForAuth() override; | 199 bool IsReadyToRestartForAuth() override; |
| 200 | 200 |
| 201 int Read(IOBuffer* buf, | 201 int Read(IOBuffer* buf, |
| 202 int buf_len, | 202 int buf_len, |
| 203 const CompletionCallback& callback) override; | 203 const CompletionCallback& callback) override; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 //----------------------------------------------------------------------------- | 350 //----------------------------------------------------------------------------- |
| 351 // helpers | 351 // helpers |
| 352 | 352 |
| 353 // read the transaction completely | 353 // read the transaction completely |
| 354 int ReadTransaction(HttpTransaction* trans, std::string* result); | 354 int ReadTransaction(HttpTransaction* trans, std::string* result); |
| 355 | 355 |
| 356 } // namespace net | 356 } // namespace net |
| 357 | 357 |
| 358 #endif // NET_HTTP_HTTP_TRANSACTION_TEST_UTIL_H_ | 358 #endif // NET_HTTP_HTTP_TRANSACTION_TEST_UTIL_H_ |
| OLD | NEW |