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

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

Issue 501163002: Make URLRequest's constructor private, and make URLRequestContext a friend class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge yet again Created 6 years, 3 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 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 protected: 115 protected:
116 virtual ~TestURLRequestContextGetter(); 116 virtual ~TestURLRequestContextGetter();
117 117
118 private: 118 private:
119 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 119 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
120 scoped_ptr<TestURLRequestContext> context_; 120 scoped_ptr<TestURLRequestContext> context_;
121 }; 121 };
122 122
123 //----------------------------------------------------------------------------- 123 //-----------------------------------------------------------------------------
124 124
125 class TestURLRequest : public URLRequest {
126 public:
127 TestURLRequest(const GURL& url,
128 RequestPriority priority,
129 Delegate* delegate,
130 TestURLRequestContext* context);
131 virtual ~TestURLRequest();
132 };
133
134 //-----------------------------------------------------------------------------
135
136 class TestDelegate : public URLRequest::Delegate { 125 class TestDelegate : public URLRequest::Delegate {
137 public: 126 public:
138 TestDelegate(); 127 TestDelegate();
139 virtual ~TestDelegate(); 128 virtual ~TestDelegate();
140 129
141 void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; } 130 void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; }
142 void set_cancel_in_response_started(bool val) { cancel_in_rs_ = val; } 131 void set_cancel_in_response_started(bool val) { cancel_in_rs_ = val; }
143 void set_cancel_in_received_data(bool val) { cancel_in_rd_ = val; } 132 void set_cancel_in_received_data(bool val) { cancel_in_rd_ = val; }
144 void set_cancel_in_received_data_pending(bool val) { 133 void set_cancel_in_received_data_pending(bool val) {
145 cancel_in_rd_pending_ = val; 134 cancel_in_rd_pending_ = val;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 NetworkDelegate* network_delegate) const OVERRIDE; 402 NetworkDelegate* network_delegate) const OVERRIDE;
414 void set_main_intercept_job(URLRequestJob* job); 403 void set_main_intercept_job(URLRequestJob* job);
415 404
416 private: 405 private:
417 mutable URLRequestJob* main_intercept_job_; 406 mutable URLRequestJob* main_intercept_job_;
418 }; 407 };
419 408
420 } // namespace net 409 } // namespace net
421 410
422 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 411 #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