| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "net/http/http_transaction.h" | 9 #include "net/http/http_transaction.h" |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 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/message_loop.h" | 16 #include "base/message_loop.h" |
| 17 #include "base/string16.h" |
| 17 #include "base/string_util.h" | 18 #include "base/string_util.h" |
| 18 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
| 19 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
| 20 #include "net/base/load_flags.h" | 21 #include "net/base/load_flags.h" |
| 21 #include "net/base/test_completion_callback.h" | 22 #include "net/base/test_completion_callback.h" |
| 22 #include "net/disk_cache/disk_cache.h" | 23 #include "net/disk_cache/disk_cache.h" |
| 23 #include "net/http/http_cache.h" | 24 #include "net/http/http_cache.h" |
| 24 #include "net/http/http_request_info.h" | 25 #include "net/http/http_request_info.h" |
| 25 #include "net/http/http_response_headers.h" | 26 #include "net/http/http_response_headers.h" |
| 26 #include "net/http/http_response_info.h" | 27 #include "net/http/http_response_info.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 254 |
| 254 virtual int RestartIgnoringLastError(net::CompletionCallback* callback) { | 255 virtual int RestartIgnoringLastError(net::CompletionCallback* callback) { |
| 255 return net::ERR_FAILED; | 256 return net::ERR_FAILED; |
| 256 } | 257 } |
| 257 | 258 |
| 258 virtual int RestartWithCertificate(net::X509Certificate* client_cert, | 259 virtual int RestartWithCertificate(net::X509Certificate* client_cert, |
| 259 net::CompletionCallback* callback) { | 260 net::CompletionCallback* callback) { |
| 260 return net::ERR_FAILED; | 261 return net::ERR_FAILED; |
| 261 } | 262 } |
| 262 | 263 |
| 263 virtual int RestartWithAuth(const std::wstring& username, | 264 virtual int RestartWithAuth(const string16& username, |
| 264 const std::wstring& password, | 265 const string16& password, |
| 265 net::CompletionCallback* callback) { | 266 net::CompletionCallback* callback) { |
| 266 return net::ERR_FAILED; | 267 return net::ERR_FAILED; |
| 267 } | 268 } |
| 268 | 269 |
| 269 virtual bool IsReadyToRestartForAuth() { | 270 virtual bool IsReadyToRestartForAuth() { |
| 270 return false; | 271 return false; |
| 271 } | 272 } |
| 272 | 273 |
| 273 virtual int Read(net::IOBuffer* buf, int buf_len, | 274 virtual int Read(net::IOBuffer* buf, int buf_len, |
| 274 net::CompletionCallback* callback) { | 275 net::CompletionCallback* callback) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 }; | 346 }; |
| 346 | 347 |
| 347 | 348 |
| 348 //----------------------------------------------------------------------------- | 349 //----------------------------------------------------------------------------- |
| 349 // helpers | 350 // helpers |
| 350 | 351 |
| 351 // read the transaction completely | 352 // read the transaction completely |
| 352 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 353 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 353 | 354 |
| 354 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 355 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| OLD | NEW |