OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_unittest.h" | 5 #include "net/http/http_transaction_unittest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 net::OldCompletionCallback* callback) { | 264 net::OldCompletionCallback* callback) { |
265 return net::ERR_FAILED; | 265 return net::ERR_FAILED; |
266 } | 266 } |
267 | 267 |
268 int MockNetworkTransaction::RestartWithCertificate( | 268 int MockNetworkTransaction::RestartWithCertificate( |
269 net::X509Certificate* client_cert, | 269 net::X509Certificate* client_cert, |
270 net::OldCompletionCallback* callback) { | 270 net::OldCompletionCallback* callback) { |
271 return net::ERR_FAILED; | 271 return net::ERR_FAILED; |
272 } | 272 } |
273 | 273 |
274 int MockNetworkTransaction::RestartWithAuth(const string16& username, | 274 int MockNetworkTransaction::RestartWithAuth( |
275 const string16& password, | 275 const net::AuthCredentials& credentials, |
276 net::OldCompletionCallback* callback
) { | 276 net::OldCompletionCallback* callback) { |
277 return net::ERR_FAILED; | 277 return net::ERR_FAILED; |
278 } | 278 } |
279 | 279 |
280 bool MockNetworkTransaction::IsReadyToRestartForAuth() { | 280 bool MockNetworkTransaction::IsReadyToRestartForAuth() { |
281 return false; | 281 return false; |
282 } | 282 } |
283 | 283 |
284 int MockNetworkTransaction::Read(net::IOBuffer* buf, int buf_len, | 284 int MockNetworkTransaction::Read(net::IOBuffer* buf, int buf_len, |
285 net::OldCompletionCallback* callback) { | 285 net::OldCompletionCallback* callback) { |
286 int data_len = static_cast<int>(data_.size()); | 286 int data_len = static_cast<int>(data_.size()); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 if (rv > 0) { | 370 if (rv > 0) { |
371 content.append(buf->data(), rv); | 371 content.append(buf->data(), rv); |
372 } else if (rv < 0) { | 372 } else if (rv < 0) { |
373 return rv; | 373 return rv; |
374 } | 374 } |
375 } while (rv > 0); | 375 } while (rv > 0); |
376 | 376 |
377 result->swap(content); | 377 result->swap(content); |
378 return net::OK; | 378 return net::OK; |
379 } | 379 } |
OLD | NEW |