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 #include "net/http/http_transaction_test_util.h" | 5 #include "net/http/http_transaction_test_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 request_ = request; | 250 request_ = request; |
251 return StartInternal(request, callback, net_log); | 251 return StartInternal(request, callback, net_log); |
252 } | 252 } |
253 | 253 |
254 int MockNetworkTransaction::RestartIgnoringLastError( | 254 int MockNetworkTransaction::RestartIgnoringLastError( |
255 const CompletionCallback& callback) { | 255 const CompletionCallback& callback) { |
256 return ERR_FAILED; | 256 return ERR_FAILED; |
257 } | 257 } |
258 | 258 |
259 int MockNetworkTransaction::RestartWithCertificate( | 259 int MockNetworkTransaction::RestartWithCertificate( |
260 X509Certificate* client_cert, | 260 scoped_refptr<X509Certificate> client_cert, |
261 SSLPrivateKey* client_private_key, | 261 scoped_refptr<SSLPrivateKey> client_private_key, |
262 const CompletionCallback& callback) { | 262 const CompletionCallback& callback) { |
263 return ERR_FAILED; | 263 return ERR_FAILED; |
264 } | 264 } |
265 | 265 |
266 int MockNetworkTransaction::RestartWithAuth( | 266 int MockNetworkTransaction::RestartWithAuth( |
267 const AuthCredentials& credentials, | 267 const AuthCredentials& credentials, |
268 const CompletionCallback& callback) { | 268 const CompletionCallback& callback) { |
269 if (!IsReadyToRestartForAuth()) | 269 if (!IsReadyToRestartForAuth()) |
270 return ERR_FAILED; | 270 return ERR_FAILED; |
271 | 271 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 content.append(buf->data(), rv); | 582 content.append(buf->data(), rv); |
583 else if (rv < 0) | 583 else if (rv < 0) |
584 return rv; | 584 return rv; |
585 } while (rv > 0); | 585 } while (rv > 0); |
586 | 586 |
587 result->swap(content); | 587 result->swap(content); |
588 return OK; | 588 return OK; |
589 } | 589 } |
590 | 590 |
591 } // namespace net | 591 } // namespace net |
OLD | NEW |