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::SingleThreadTaskRunner> network_task_runner_; | 89 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
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_; |
mmenke
2012/06/20 20:24:14
This isn't needed any more.
| |
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: |
108 TestDelegate(); | 109 TestDelegate(); |
109 virtual ~TestDelegate(); | 110 virtual ~TestDelegate(); |
110 | 111 |
111 void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; } | 112 void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; } |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 | 293 |
293 private: | 294 private: |
294 static std::string value_; | 295 static std::string value_; |
295 const std::string old_value_; | 296 const std::string old_value_; |
296 const std::string new_value_; | 297 const std::string new_value_; |
297 | 298 |
298 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); | 299 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); |
299 }; | 300 }; |
300 | 301 |
301 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 302 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
OLD | NEW |