| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 virtual void OnBeforeRedirect(net::URLRequest* request, | 200 virtual void OnBeforeRedirect(net::URLRequest* request, |
| 201 const GURL& new_location); | 201 const GURL& new_location); |
| 202 virtual void OnResponseStarted(net::URLRequest* request); | 202 virtual void OnResponseStarted(net::URLRequest* request); |
| 203 virtual void OnRawBytesRead(const net::URLRequest& request, int bytes_read); | 203 virtual void OnRawBytesRead(const net::URLRequest& request, int bytes_read); |
| 204 virtual void OnCompleted(net::URLRequest* request); | 204 virtual void OnCompleted(net::URLRequest* request); |
| 205 virtual void OnURLRequestDestroyed(net::URLRequest* request); | 205 virtual void OnURLRequestDestroyed(net::URLRequest* request); |
| 206 virtual void OnHttpTransactionDestroyed(uint64 request_id); | 206 virtual void OnHttpTransactionDestroyed(uint64 request_id); |
| 207 virtual net::URLRequestJob* OnMaybeCreateURLRequestJob( | 207 virtual net::URLRequestJob* OnMaybeCreateURLRequestJob( |
| 208 net::URLRequest* request); | 208 net::URLRequest* request); |
| 209 virtual void OnPACScriptError(int line_number, const string16& error); | 209 virtual void OnPACScriptError(int line_number, const string16& error); |
| 210 virtual void OnAuthRequired(net::URLRequest* request, | 210 virtual int OnAuthRequired(net::URLRequest* request, |
| 211 const net::AuthChallengeInfo& auth_info); | 211 const net::AuthChallengeInfo& auth_info, |
| 212 net::CompletionCallback* callback, |
| 213 net::AuthCredentials* credentials); |
| 212 | 214 |
| 213 void InitRequestStatesIfNew(int request_id); | 215 void InitRequestStatesIfNew(int request_id); |
| 214 | 216 |
| 215 int last_error_; | 217 int last_error_; |
| 216 int error_count_; | 218 int error_count_; |
| 217 int created_requests_; | 219 int created_requests_; |
| 218 int destroyed_requests_; | 220 int destroyed_requests_; |
| 219 int completed_requests_; | 221 int completed_requests_; |
| 220 | 222 |
| 221 // net::NetworkDelegate callbacks happen in a particular order (e.g. | 223 // net::NetworkDelegate callbacks happen in a particular order (e.g. |
| 222 // OnBeforeURLRequest is always called before OnBeforeSendHeaders). | 224 // OnBeforeURLRequest is always called before OnBeforeSendHeaders). |
| 223 // This bit-set indicates for each request id (key) what events may be sent | 225 // This bit-set indicates for each request id (key) what events may be sent |
| 224 // next. | 226 // next. |
| 225 std::map<int, int> next_states_; | 227 std::map<int, int> next_states_; |
| 226 | 228 |
| 227 // A log that records for each request id (key) the order in which On... | 229 // A log that records for each request id (key) the order in which On... |
| 228 // functions were called. | 230 // functions were called. |
| 229 std::map<int, std::string> event_order_; | 231 std::map<int, std::string> event_order_; |
| 230 }; | 232 }; |
| 231 | 233 |
| 232 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 234 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| OLD | NEW |