| OLD | NEW |
| 1 // Copyright (c) 2010 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_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 virtual ~TestURLRequestContext() { | 149 virtual ~TestURLRequestContext() { |
| 150 delete ftp_transaction_factory_; | 150 delete ftp_transaction_factory_; |
| 151 delete http_transaction_factory_; | 151 delete http_transaction_factory_; |
| 152 delete http_auth_handler_factory_; | 152 delete http_auth_handler_factory_; |
| 153 } | 153 } |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 void Init() { | 156 void Init() { |
| 157 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); | 157 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); |
| 158 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 158 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
| 159 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 159 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( |
| 160 host_resolver_); |
| 160 http_transaction_factory_ = new net::HttpCache( | 161 http_transaction_factory_ = new net::HttpCache( |
| 161 net::HttpNetworkLayer::CreateFactory(host_resolver_, | 162 net::HttpNetworkLayer::CreateFactory(host_resolver_, |
| 162 proxy_service_, | 163 proxy_service_, |
| 163 ssl_config_service_, | 164 ssl_config_service_, |
| 164 http_auth_handler_factory_, | 165 http_auth_handler_factory_, |
| 165 network_delegate_, | 166 network_delegate_, |
| 166 NULL), | 167 NULL), |
| 167 net::HttpCache::DefaultBackend::InMemory(0)); | 168 net::HttpCache::DefaultBackend::InMemory(0)); |
| 168 // In-memory cookie store. | 169 // In-memory cookie store. |
| 169 cookie_store_ = new net::CookieMonster(NULL, NULL); | 170 cookie_store_ = new net::CookieMonster(NULL, NULL); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 bool received_data_before_response_; | 385 bool received_data_before_response_; |
| 385 bool request_failed_; | 386 bool request_failed_; |
| 386 bool have_certificate_errors_; | 387 bool have_certificate_errors_; |
| 387 std::string data_received_; | 388 std::string data_received_; |
| 388 | 389 |
| 389 // our read buffer | 390 // our read buffer |
| 390 scoped_refptr<net::IOBuffer> buf_; | 391 scoped_refptr<net::IOBuffer> buf_; |
| 391 }; | 392 }; |
| 392 | 393 |
| 393 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 394 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| OLD | NEW |