| 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 #include "net/base/mock_filter_context.h" | 5 #include "net/base/mock_filter_context.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 MockFilterContext::MockFilterContext(int buffer_size) | 9 MockFilterContext::MockFilterContext() |
| 10 : buffer_size_(buffer_size), | 10 : is_cached_content_(false), |
| 11 is_cached_content_(false), | |
| 12 is_download_(false), | 11 is_download_(false), |
| 13 is_sdch_response_(false), | 12 is_sdch_response_(false), |
| 14 response_code_(-1) { | 13 response_code_(-1) { |
| 15 } | 14 } |
| 16 | 15 |
| 17 MockFilterContext::~MockFilterContext() {} | 16 MockFilterContext::~MockFilterContext() {} |
| 18 | 17 |
| 19 bool MockFilterContext::GetMimeType(std::string* mime_type) const { | 18 bool MockFilterContext::GetMimeType(std::string* mime_type) const { |
| 20 *mime_type = mime_type_; | 19 *mime_type = mime_type_; |
| 21 return true; | 20 return true; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 36 bool MockFilterContext::IsCachedContent() const { return is_cached_content_; } | 35 bool MockFilterContext::IsCachedContent() const { return is_cached_content_; } |
| 37 | 36 |
| 38 bool MockFilterContext::IsDownload() const { return is_download_; } | 37 bool MockFilterContext::IsDownload() const { return is_download_; } |
| 39 | 38 |
| 40 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; } | 39 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; } |
| 41 | 40 |
| 42 int64 MockFilterContext::GetByteReadCount() const { return 0; } | 41 int64 MockFilterContext::GetByteReadCount() const { return 0; } |
| 43 | 42 |
| 44 int MockFilterContext::GetResponseCode() const { return response_code_; } | 43 int MockFilterContext::GetResponseCode() const { return response_code_; } |
| 45 | 44 |
| 46 int MockFilterContext::GetInputStreamBufferSize() const { return buffer_size_; } | |
| 47 | |
| 48 } // namespace net | 45 } // namespace net |
| OLD | NEW |