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

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 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
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 private:
101 const scoped_ptr<net::URLRequestContext> context_;
102 }; 100 };
103 101
104 //----------------------------------------------------------------------------- 102 //-----------------------------------------------------------------------------
105 103
106 class TestDelegate : public net::URLRequest::Delegate { 104 class TestDelegate : public net::URLRequest::Delegate {
107 public: 105 public:
108 TestDelegate(); 106 TestDelegate();
109 virtual ~TestDelegate(); 107 virtual ~TestDelegate();
110 108
111 void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; } 109 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 290
293 private: 291 private:
294 static std::string value_; 292 static std::string value_;
295 const std::string old_value_; 293 const std::string old_value_;
296 const std::string new_value_; 294 const std::string new_value_;
297 295
298 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); 296 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost);
299 }; 297 };
300 298
301 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 299 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698