| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Filter performs filtering on data streams. Sample usage: | 5 // Filter performs filtering on data streams. Sample usage: |
| 6 // | 6 // |
| 7 // IStream* pre_filter_source; | 7 // IStream* pre_filter_source; |
| 8 // ... | 8 // ... |
| 9 // Filter* filter = Filter::Factory(filter_type, size); | 9 // Filter* filter = Filter::Factory(filter_type, size); |
| 10 // int pre_filter_data_len = filter->stream_buffer_size(); | 10 // int pre_filter_data_len = filter->stream_buffer_size(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // When was this data requested from a server? | 82 // When was this data requested from a server? |
| 83 virtual base::Time GetRequestTime() const = 0; | 83 virtual base::Time GetRequestTime() const = 0; |
| 84 | 84 |
| 85 // Is data supplied from cache, or fresh across the net? | 85 // Is data supplied from cache, or fresh across the net? |
| 86 virtual bool IsCachedContent() const = 0; | 86 virtual bool IsCachedContent() const = 0; |
| 87 | 87 |
| 88 // Is this a download? | 88 // Is this a download? |
| 89 virtual bool IsDownload() const = 0; | 89 virtual bool IsDownload() const = 0; |
| 90 | 90 |
| 91 // Was this data flagged as a response to a request with an SDCH dictionary? | 91 // Was this data flagged as a response to a request with an SDCH dictionary? |
| 92 virtual bool IsSdchResponse() const = 0; | 92 virtual bool SdchResponseExpected() const = 0; |
| 93 | 93 |
| 94 // How many bytes were read from the net or cache so far (and potentially | 94 // How many bytes were read from the net or cache so far (and potentially |
| 95 // pushed into a filter for processing)? | 95 // pushed into a filter for processing)? |
| 96 virtual int64 GetByteReadCount() const = 0; | 96 virtual int64 GetByteReadCount() const = 0; |
| 97 | 97 |
| 98 // What response code was received with the associated network transaction? | 98 // What response code was received with the associated network transaction? |
| 99 // For example: 200 is ok. 4xx are error codes. etc. | 99 // For example: 200 is ok. 4xx are error codes. etc. |
| 100 virtual int GetResponseCode() const = 0; | 100 virtual int GetResponseCode() const = 0; |
| 101 | 101 |
| 102 // The URLRequestContext associated with the request. | 102 // The URLRequestContext associated with the request. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // Remember what status or local filter last returned so we can better handle | 275 // Remember what status or local filter last returned so we can better handle |
| 276 // chained filters. | 276 // chained filters. |
| 277 FilterStatus last_status_; | 277 FilterStatus last_status_; |
| 278 | 278 |
| 279 DISALLOW_COPY_AND_ASSIGN(Filter); | 279 DISALLOW_COPY_AND_ASSIGN(Filter); |
| 280 }; | 280 }; |
| 281 | 281 |
| 282 } // namespace net | 282 } // namespace net |
| 283 | 283 |
| 284 #endif // NET_FILTER_FILTER_H__ | 284 #endif // NET_FILTER_FILTER_H__ |
| OLD | NEW |