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

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

Issue 12328072: Remove some calls to URLRequestContext::network_delegate(). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Provide read-only access to network delegate for derived classes. Created 7 years, 9 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 | Annotate | Revision Log
« 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 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
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
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_
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