| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_UTIL_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 89 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 90 scoped_ptr<TestURLRequestContext> context_; | 90 scoped_ptr<TestURLRequestContext> context_; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 //----------------------------------------------------------------------------- | 93 //----------------------------------------------------------------------------- |
| 94 | 94 |
| 95 class TestURLRequest : public net::URLRequest { | 95 class TestURLRequest : public net::URLRequest { |
| 96 public: | 96 public: |
| 97 TestURLRequest(const GURL& url, Delegate* delegate); | 97 TestURLRequest( |
| 98 const GURL& url, Delegate* delegate, TestURLRequestContext* context); |
| 98 virtual ~TestURLRequest(); | 99 virtual ~TestURLRequest(); |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 const scoped_ptr<net::URLRequestContext> context_; | 102 const scoped_ptr<net::URLRequestContext> context_; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 //----------------------------------------------------------------------------- | 105 //----------------------------------------------------------------------------- |
| 105 | 106 |
| 106 class TestDelegate : public net::URLRequest::Delegate { | 107 class TestDelegate : public net::URLRequest::Delegate { |
| 107 public: | 108 public: |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 290 |
| 290 private: | 291 private: |
| 291 static std::string value_; | 292 static std::string value_; |
| 292 const std::string old_value_; | 293 const std::string old_value_; |
| 293 const std::string new_value_; | 294 const std::string new_value_; |
| 294 | 295 |
| 295 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); | 296 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); |
| 296 }; | 297 }; |
| 297 | 298 |
| 298 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 299 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| OLD | NEW |