| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 // successful, otherwise an error code is returned. | 510 // successful, otherwise an error code is returned. |
| 511 int Redirect(const GURL& location, int http_status_code); | 511 int Redirect(const GURL& location, int http_status_code); |
| 512 | 512 |
| 513 // Called by URLRequestJob to allow interception when a redirect occurs. | 513 // Called by URLRequestJob to allow interception when a redirect occurs. |
| 514 void ReceivedRedirect(const GURL& location, bool* defer_redirect); | 514 void ReceivedRedirect(const GURL& location, bool* defer_redirect); |
| 515 | 515 |
| 516 // Called by URLRequestJob to allow interception when the final response | 516 // Called by URLRequestJob to allow interception when the final response |
| 517 // occurs. | 517 // occurs. |
| 518 void ResponseStarted(); | 518 void ResponseStarted(); |
| 519 | 519 |
| 520 // Allow an interceptor's URLRequestJob to restart this request. | |
| 521 // Should only be called if the original job has not started a resposne. | |
| 522 void Restart(); | |
| 523 | |
| 524 private: | 520 private: |
| 525 friend class URLRequestJob; | 521 friend class URLRequestJob; |
| 526 | 522 |
| 527 void StartJob(URLRequestJob* job); | 523 void StartJob(URLRequestJob* job); |
| 528 | 524 |
| 529 // Restarting involves replacing the current job with a new one such as what | 525 // Restarting involves replacing the current job with a new one such as what |
| 530 // happens when following a HTTP redirect. | 526 // happens when following a HTTP redirect. |
| 531 void RestartWithJob(URLRequestJob *job); | 527 void RestartWithJob(URLRequestJob *job); |
| 532 void PrepareToRestart(); | 528 void PrepareToRestart(); |
| 533 | 529 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 #define URLREQUEST_COUNT_DTOR() url_request_metrics.object_count-- | 621 #define URLREQUEST_COUNT_DTOR() url_request_metrics.object_count-- |
| 626 | 622 |
| 627 #else // disable leak checking in release builds... | 623 #else // disable leak checking in release builds... |
| 628 | 624 |
| 629 #define URLREQUEST_COUNT_CTOR() | 625 #define URLREQUEST_COUNT_CTOR() |
| 630 #define URLREQUEST_COUNT_DTOR() | 626 #define URLREQUEST_COUNT_DTOR() |
| 631 | 627 |
| 632 #endif // #ifndef NDEBUG | 628 #endif // #ifndef NDEBUG |
| 633 | 629 |
| 634 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 630 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |