| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "net/base/auth.h" | 14 #include "net/base/auth.h" |
| 15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
| 16 #include "net/http/http_request_info.h" | 16 #include "net/http/http_request_info.h" |
| 17 #include "net/url_request/url_request_job.h" | 17 #include "net/url_request/url_request_job.h" |
| 18 #include "net/url_request/url_request_throttler_entry_interface.h" |
| 18 | 19 |
| 19 namespace net { | 20 namespace net { |
| 20 class HttpResponseInfo; | 21 class HttpResponseInfo; |
| 21 class HttpTransaction; | 22 class HttpTransaction; |
| 22 } | 23 } |
| 23 class URLRequestContext; | 24 class URLRequestContext; |
| 24 | 25 |
| 25 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 26 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
| 26 // provides an implementation for both HTTP and HTTPS. | 27 // provides an implementation for both HTTP and HTTPS. |
| 27 class URLRequestHttpJob : public URLRequestJob { | 28 class URLRequestHttpJob : public URLRequestJob { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 net::CompletionCallbackImpl<URLRequestHttpJob> start_callback_; | 106 net::CompletionCallbackImpl<URLRequestHttpJob> start_callback_; |
| 106 net::CompletionCallbackImpl<URLRequestHttpJob> read_callback_; | 107 net::CompletionCallbackImpl<URLRequestHttpJob> read_callback_; |
| 107 | 108 |
| 108 bool read_in_progress_; | 109 bool read_in_progress_; |
| 109 | 110 |
| 110 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. | 111 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. |
| 111 GURL sdch_dictionary_url_; | 112 GURL sdch_dictionary_url_; |
| 112 | 113 |
| 113 scoped_ptr<net::HttpTransaction> transaction_; | 114 scoped_ptr<net::HttpTransaction> transaction_; |
| 114 | 115 |
| 116 // This is used to supervise traffic and enforce exponential back-off. |
| 117 scoped_refptr<net::URLRequestThrottlerEntryInterface> throttling_entry_; |
| 118 |
| 115 // Indicated if an SDCH dictionary was advertised, and hence an SDCH | 119 // Indicated if an SDCH dictionary was advertised, and hence an SDCH |
| 116 // compressed response is expected. We use this to help detect (accidental?) | 120 // compressed response is expected. We use this to help detect (accidental?) |
| 117 // proxy corruption of a response, which sometimes marks SDCH content as | 121 // proxy corruption of a response, which sometimes marks SDCH content as |
| 118 // having no content encoding <oops>. | 122 // having no content encoding <oops>. |
| 119 bool sdch_dictionary_advertised_; | 123 bool sdch_dictionary_advertised_; |
| 120 | 124 |
| 121 // For SDCH latency experiments, when we are able to do SDCH, we may enable | 125 // For SDCH latency experiments, when we are able to do SDCH, we may enable |
| 122 // either an SDCH latency test xor a pass through test. The following bools | 126 // either an SDCH latency test xor a pass through test. The following bools |
| 123 // indicate what we decided on for this instance. | 127 // indicate what we decided on for this instance. |
| 124 bool sdch_test_activated_; // Advertising a dictionary for sdch. | 128 bool sdch_test_activated_; // Advertising a dictionary for sdch. |
| 125 bool sdch_test_control_; // Not even accepting-content sdch. | 129 bool sdch_test_control_; // Not even accepting-content sdch. |
| 126 | 130 |
| 127 // For recording of stats, we need to remember if this is cached content. | 131 // For recording of stats, we need to remember if this is cached content. |
| 128 bool is_cached_content_; | 132 bool is_cached_content_; |
| 129 | 133 |
| 130 private: | 134 private: |
| 131 virtual ~URLRequestHttpJob(); | 135 virtual ~URLRequestHttpJob(); |
| 132 | 136 |
| 133 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 137 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 134 }; | 138 }; |
| 135 | 139 |
| 136 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 140 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |