| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class URLRequestContext; | 41 class URLRequestContext; |
| 42 | 42 |
| 43 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 43 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
| 44 // provides an implementation for both HTTP and HTTPS. | 44 // provides an implementation for both HTTP and HTTPS. |
| 45 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { | 45 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { |
| 46 public: | 46 public: |
| 47 static URLRequestJob* Factory(URLRequest* request, | 47 static URLRequestJob* Factory(URLRequest* request, |
| 48 NetworkDelegate* network_delegate, | 48 NetworkDelegate* network_delegate, |
| 49 const std::string& scheme); | 49 const std::string& scheme); |
| 50 | 50 |
| 51 // Record Sdch specific packet stats. Public so that SdchPolicyDelegate can |
| 52 // access it. |
| 53 void RecordPacketStats(FilterContext::StatisticSelector statistic) const; |
| 54 |
| 51 protected: | 55 protected: |
| 52 URLRequestHttpJob(URLRequest* request, | 56 URLRequestHttpJob(URLRequest* request, |
| 53 NetworkDelegate* network_delegate, | 57 NetworkDelegate* network_delegate, |
| 54 const HttpUserAgentSettings* http_user_agent_settings); | 58 const HttpUserAgentSettings* http_user_agent_settings); |
| 55 | 59 |
| 56 ~URLRequestHttpJob() override; | 60 ~URLRequestHttpJob() override; |
| 57 | 61 |
| 58 // Overridden from URLRequestJob: | 62 // Overridden from URLRequestJob: |
| 59 void SetPriority(RequestPriority priority) override; | 63 void SetPriority(RequestPriority priority) override; |
| 60 void Start() override; | 64 void Start() override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void DoneReading() override; | 142 void DoneReading() override; |
| 139 void DoneReadingRedirectResponse() override; | 143 void DoneReadingRedirectResponse() override; |
| 140 | 144 |
| 141 HostPortPair GetSocketAddress() const override; | 145 HostPortPair GetSocketAddress() const override; |
| 142 void NotifyURLRequestDestroyed() override; | 146 void NotifyURLRequestDestroyed() override; |
| 143 | 147 |
| 144 void RecordTimer(); | 148 void RecordTimer(); |
| 145 void ResetTimer(); | 149 void ResetTimer(); |
| 146 | 150 |
| 147 void UpdatePacketReadTimes() override; | 151 void UpdatePacketReadTimes() override; |
| 148 void RecordPacketStats(FilterContext::StatisticSelector statistic) const; | |
| 149 | 152 |
| 150 // Starts the transaction if extensions using the webrequest API do not | 153 // Starts the transaction if extensions using the webrequest API do not |
| 151 // object. | 154 // object. |
| 152 void StartTransaction(); | 155 void StartTransaction(); |
| 153 // If |result| is OK, calls StartTransactionInternal. Otherwise notifies | 156 // If |result| is OK, calls StartTransactionInternal. Otherwise notifies |
| 154 // cancellation. | 157 // cancellation. |
| 155 void MaybeStartTransactionInternal(int result); | 158 void MaybeStartTransactionInternal(int result); |
| 156 void StartTransactionInternal(); | 159 void StartTransactionInternal(); |
| 157 | 160 |
| 158 void RecordPerfHistograms(CompletionCause reason); | 161 void RecordPerfHistograms(CompletionCause reason); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 int64_t total_sent_bytes_from_previous_transactions_; | 274 int64_t total_sent_bytes_from_previous_transactions_; |
| 272 | 275 |
| 273 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 276 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
| 274 | 277 |
| 275 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 278 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 276 }; | 279 }; |
| 277 | 280 |
| 278 } // namespace net | 281 } // namespace net |
| 279 | 282 |
| 280 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 283 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |