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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // What mime type was specified in the header for this data? | 68 // What mime type was specified in the header for this data? |
69 // Only makes senses for some types of contexts, and returns false | 69 // Only makes senses for some types of contexts, and returns false |
70 // when not applicable. | 70 // when not applicable. |
71 virtual bool GetMimeType(std::string* mime_type) const = 0; | 71 virtual bool GetMimeType(std::string* mime_type) const = 0; |
72 | 72 |
73 // What URL was used to access this data? | 73 // What URL was used to access this data? |
74 // Return false if gurl is not present. | 74 // Return false if gurl is not present. |
75 virtual bool GetURL(GURL* gurl) const = 0; | 75 virtual bool GetURL(GURL* gurl) const = 0; |
76 | 76 |
| 77 // What Content-Disposition header came with this data? |
| 78 // Return false if no header was present. |
| 79 virtual bool GetContentDisposition(std::string* disposition) const = 0; |
| 80 |
77 // When was this data requested from a server? | 81 // When was this data requested from a server? |
78 virtual base::Time GetRequestTime() const = 0; | 82 virtual base::Time GetRequestTime() const = 0; |
79 | 83 |
80 // Is data supplied from cache, or fresh across the net? | 84 // Is data supplied from cache, or fresh across the net? |
81 virtual bool IsCachedContent() const = 0; | 85 virtual bool IsCachedContent() const = 0; |
82 | 86 |
83 // Is this a download? | 87 // Is this a download? |
84 virtual bool IsDownload() const = 0; | 88 virtual bool IsDownload() const = 0; |
85 | 89 |
86 // Was this data flagged as a response to a request with an SDCH dictionary? | 90 // Was this data flagged as a response to a request with an SDCH dictionary? |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Remember what status or local filter last returned so we can better handle | 271 // Remember what status or local filter last returned so we can better handle |
268 // chained filters. | 272 // chained filters. |
269 FilterStatus last_status_; | 273 FilterStatus last_status_; |
270 | 274 |
271 DISALLOW_COPY_AND_ASSIGN(Filter); | 275 DISALLOW_COPY_AND_ASSIGN(Filter); |
272 }; | 276 }; |
273 | 277 |
274 } // namespace net | 278 } // namespace net |
275 | 279 |
276 #endif // NET_FILTER_FILTER_H__ | 280 #endif // NET_FILTER_FILTER_H__ |
OLD | NEW |