| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // What URL was used to access this data? | 58 // What URL was used to access this data? |
| 59 // Return false if gurl is not present. | 59 // Return false if gurl is not present. |
| 60 virtual bool GetURL(GURL* gurl) const = 0; | 60 virtual bool GetURL(GURL* gurl) const = 0; |
| 61 | 61 |
| 62 // When was this data requested from a server? | 62 // When was this data requested from a server? |
| 63 virtual base::Time GetRequestTime() const = 0; | 63 virtual base::Time GetRequestTime() const = 0; |
| 64 | 64 |
| 65 // Is data supplied from cache, or fresh across the net? | 65 // Is data supplied from cache, or fresh across the net? |
| 66 virtual bool IsCachedContent() const = 0; | 66 virtual bool IsCachedContent() const = 0; |
| 67 | 67 |
| 68 // Is this a download? |
| 69 virtual bool IsDownload() const = 0; |
| 70 |
| 68 // Was this data flagged as a response to a request with an SDCH dictionary? | 71 // Was this data flagged as a response to a request with an SDCH dictionary? |
| 69 virtual bool IsSdchResponse() const = 0; | 72 virtual bool IsSdchResponse() const = 0; |
| 70 | 73 |
| 71 // How many bytes were read from the net or cache so far (and potentially | 74 // How many bytes were read from the net or cache so far (and potentially |
| 72 // pushed into a filter for processing)? | 75 // pushed into a filter for processing)? |
| 73 virtual int64 GetByteReadCount() const = 0; | 76 virtual int64 GetByteReadCount() const = 0; |
| 74 | 77 |
| 75 // What response code was received with the associated network transaction? | 78 // What response code was received with the associated network transaction? |
| 76 // For example: 200 is ok. 4xx are error codes. etc. | 79 // For example: 200 is ok. 4xx are error codes. etc. |
| 77 virtual int GetResponseCode() const = 0; | 80 virtual int GetResponseCode() const = 0; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 241 |
| 239 // Context data from the owner of this filter. Some filters need additional | 242 // Context data from the owner of this filter. Some filters need additional |
| 240 // context information (mime type, etc.) to properly function, and they access | 243 // context information (mime type, etc.) to properly function, and they access |
| 241 // this data via this reference member. | 244 // this data via this reference member. |
| 242 const FilterContext& filter_context_; | 245 const FilterContext& filter_context_; |
| 243 | 246 |
| 244 DISALLOW_COPY_AND_ASSIGN(Filter); | 247 DISALLOW_COPY_AND_ASSIGN(Filter); |
| 245 }; | 248 }; |
| 246 | 249 |
| 247 #endif // NET_BASE_FILTER_H__ | 250 #endif // NET_BASE_FILTER_H__ |
| OLD | NEW |