| 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 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; | 102 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
| 103 scoped_ptr<TestURLRequestContext> context_; | 103 scoped_ptr<TestURLRequestContext> context_; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 //----------------------------------------------------------------------------- | 106 //----------------------------------------------------------------------------- |
| 107 | 107 |
| 108 class TestURLRequest : public URLRequest { | 108 class TestURLRequest : public URLRequest { |
| 109 public: | 109 public: |
| 110 // todo(tedv): Remove this interface in favor of the one below it. |
| 110 TestURLRequest( | 111 TestURLRequest( |
| 111 const GURL& url, Delegate* delegate, TestURLRequestContext* context); | 112 const GURL& url, Delegate* delegate, TestURLRequestContext* context); |
| 113 TestURLRequest( |
| 114 const GURL& url, Delegate* delegate, |
| 115 TestURLRequestContext* context, NetworkDelegate* network_delegate); |
| 112 virtual ~TestURLRequest(); | 116 virtual ~TestURLRequest(); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 //----------------------------------------------------------------------------- | 119 //----------------------------------------------------------------------------- |
| 116 | 120 |
| 117 class TestDelegate : public URLRequest::Delegate { | 121 class TestDelegate : public URLRequest::Delegate { |
| 118 public: | 122 public: |
| 119 TestDelegate(); | 123 TestDelegate(); |
| 120 virtual ~TestDelegate(); | 124 virtual ~TestDelegate(); |
| 121 | 125 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 NetworkDelegate* network_delegate) const OVERRIDE; | 340 NetworkDelegate* network_delegate) const OVERRIDE; |
| 337 void set_main_intercept_job(URLRequestJob* job); | 341 void set_main_intercept_job(URLRequestJob* job); |
| 338 | 342 |
| 339 private: | 343 private: |
| 340 mutable URLRequestJob* main_intercept_job_; | 344 mutable URLRequestJob* main_intercept_job_; |
| 341 }; | 345 }; |
| 342 | 346 |
| 343 } // namespace net | 347 } // namespace net |
| 344 | 348 |
| 345 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 349 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| OLD | NEW |