OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 TestNetworkDelegate(); | 196 TestNetworkDelegate(); |
197 virtual ~TestNetworkDelegate(); | 197 virtual ~TestNetworkDelegate(); |
198 | 198 |
199 int last_os_error() const { return last_os_error_; } | 199 int last_os_error() const { return last_os_error_; } |
200 int error_count() const { return error_count_; } | 200 int error_count() const { return error_count_; } |
201 | 201 |
202 private: | 202 private: |
203 // net::NetworkDelegate: | 203 // net::NetworkDelegate: |
204 virtual bool OnBeforeURLRequest(net::URLRequest* request, | 204 virtual bool OnBeforeURLRequest(net::URLRequest* request, |
205 net::CompletionCallback* callback); | 205 net::CompletionCallback* callback); |
206 virtual void OnSendHttpRequest(net::HttpRequestHeaders* headers); | 206 virtual bool OnBeforeHttpRequest(uint64 request_id, |
| 207 net::HttpRequestHeaders* headers, |
| 208 net::CompletionCallback* callback); |
207 virtual void OnResponseStarted(net::URLRequest* request); | 209 virtual void OnResponseStarted(net::URLRequest* request); |
208 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); | 210 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); |
209 virtual net::URLRequestJob* OnMaybeCreateURLRequestJob( | 211 virtual net::URLRequestJob* OnMaybeCreateURLRequestJob( |
210 net::URLRequest* request); | 212 net::URLRequest* request); |
211 | 213 |
212 int last_os_error_; | 214 int last_os_error_; |
213 int error_count_; | 215 int error_count_; |
214 }; | 216 }; |
215 | 217 |
216 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 218 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
OLD | NEW |