| 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 #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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 callback->Run(policy); | 115 callback->Run(policy); |
| 116 } | 116 } |
| 117 | 117 |
| 118 ScopedRunnableMethodFactory<TestCookiePolicy> method_factory_; | 118 ScopedRunnableMethodFactory<TestCookiePolicy> method_factory_; |
| 119 int options_; | 119 int options_; |
| 120 net::CompletionCallback* callback_; | 120 net::CompletionCallback* callback_; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 //----------------------------------------------------------------------------- | 123 //----------------------------------------------------------------------------- |
| 124 | 124 |
| 125 class TestURLRequestContext : public URLRequestContext { | 125 class TestURLRequestContext : public net::URLRequestContext { |
| 126 public: | 126 public: |
| 127 TestURLRequestContext() { | 127 TestURLRequestContext() { |
| 128 host_resolver_ = | 128 host_resolver_ = |
| 129 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 129 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
| 130 NULL, NULL); | 130 NULL, NULL); |
| 131 proxy_service_ = net::ProxyService::CreateDirect(); | 131 proxy_service_ = net::ProxyService::CreateDirect(); |
| 132 Init(); | 132 Init(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 explicit TestURLRequestContext(const std::string& proxy) { | 135 explicit TestURLRequestContext(const std::string& proxy) { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 bool received_data_before_response_; | 396 bool received_data_before_response_; |
| 397 bool request_failed_; | 397 bool request_failed_; |
| 398 bool have_certificate_errors_; | 398 bool have_certificate_errors_; |
| 399 std::string data_received_; | 399 std::string data_received_; |
| 400 | 400 |
| 401 // our read buffer | 401 // our read buffer |
| 402 scoped_refptr<net::IOBuffer> buf_; | 402 scoped_refptr<net::IOBuffer> buf_; |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 405 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| OLD | NEW |