| 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_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 virtual bool GetURL(GURL* gurl) const; | 202 virtual bool GetURL(GURL* gurl) const; |
| 203 virtual base::Time GetRequestTime() const; | 203 virtual base::Time GetRequestTime() const; |
| 204 virtual bool IsDownload() const; | 204 virtual bool IsDownload() const; |
| 205 virtual bool IsSdchResponse() const; | 205 virtual bool IsSdchResponse() const; |
| 206 virtual bool IsCachedContent() const; | 206 virtual bool IsCachedContent() const; |
| 207 virtual int64 GetByteReadCount() const; | 207 virtual int64 GetByteReadCount() const; |
| 208 virtual int GetResponseCode() const; | 208 virtual int GetResponseCode() const; |
| 209 virtual int GetInputStreamBufferSize() const; | 209 virtual int GetInputStreamBufferSize() const; |
| 210 virtual void RecordPacketStats(StatisticSelector statistic) const; | 210 virtual void RecordPacketStats(StatisticSelector statistic) const; |
| 211 | 211 |
| 212 // Returns the socket address for the connection. |
| 213 // See url_request.h for details. |
| 214 virtual std::string GetSocketAddress() const; |
| 215 |
| 212 protected: | 216 protected: |
| 213 friend class base::RefCounted<URLRequestJob>; | 217 friend class base::RefCounted<URLRequestJob>; |
| 214 virtual ~URLRequestJob(); | 218 virtual ~URLRequestJob(); |
| 215 | 219 |
| 216 // Notifies the job that headers have been received. | 220 // Notifies the job that headers have been received. |
| 217 void NotifyHeadersComplete(); | 221 void NotifyHeadersComplete(); |
| 218 | 222 |
| 219 // Notifies the request that the job has completed a Read operation. | 223 // Notifies the request that the job has completed a Read operation. |
| 220 void NotifyReadComplete(int bytes_read); | 224 void NotifyReadComplete(int bytes_read); |
| 221 | 225 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // The count of the number of packets, some of which may not have been timed. | 417 // The count of the number of packets, some of which may not have been timed. |
| 414 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. | 418 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. |
| 415 int observed_packet_count_; | 419 int observed_packet_count_; |
| 416 | 420 |
| 417 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 421 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 418 }; | 422 }; |
| 419 | 423 |
| 420 } // namespace net | 424 } // namespace net |
| 421 | 425 |
| 422 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 426 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |