| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 | 5 |
| 6 #ifndef NET_BASE_FILTER_UNITTEST_H_ | 6 #ifndef NET_BASE_FILTER_UNITTEST_H_ |
| 7 #define NET_BASE_FILTER_UNITTEST_H_ | 7 #define NET_BASE_FILTER_UNITTEST_H_ |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 virtual bool IsSdchResponse() const { return is_sdch_response_; } | 60 virtual bool IsSdchResponse() const { return is_sdch_response_; } |
| 61 | 61 |
| 62 // How many bytes were fed to filter(s) so far? | 62 // How many bytes were fed to filter(s) so far? |
| 63 virtual int64 GetByteReadCount() const { return 0; } | 63 virtual int64 GetByteReadCount() const { return 0; } |
| 64 | 64 |
| 65 virtual int GetResponseCode() const { return response_code_; } | 65 virtual int GetResponseCode() const { return response_code_; } |
| 66 | 66 |
| 67 // What is the desirable input buffer size for these filters? | 67 // What is the desirable input buffer size for these filters? |
| 68 virtual int GetInputStreamBufferSize() const { return buffer_size_; } | 68 virtual int GetInputStreamBufferSize() const { return buffer_size_; } |
| 69 | 69 |
| 70 virtual void RecordPacketStats(StatisticSelector statistic) const {} |
| 70 | 71 |
| 71 private: | 72 private: |
| 72 int buffer_size_; | 73 int buffer_size_; |
| 73 std::string mime_type_; | 74 std::string mime_type_; |
| 74 GURL gurl_; | 75 GURL gurl_; |
| 75 base::Time request_time_; | 76 base::Time request_time_; |
| 76 bool is_cached_content_; | 77 bool is_cached_content_; |
| 77 bool is_download_; | 78 bool is_download_; |
| 78 bool is_sdch_response_; | 79 bool is_sdch_response_; |
| 79 int response_code_; | 80 int response_code_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); | 82 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 #endif // NET_BASE_FILTER_UNITTEST_H_ | 85 #endif // NET_BASE_FILTER_UNITTEST_H_ |
| OLD | NEW |