Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: net/url_request/url_request_test_util.h

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: merged with latest version, fixed some bugs Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698