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