Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "net/base/mock_filter_context.h" | |
| 6 | |
| 7 namespace net { | |
| 8 | |
| 9 MockFilterContext::MockFilterContext(int buffer_size) | |
| 10 : buffer_size_(buffer_size), | |
| 11 is_cached_content_(false), | |
| 12 is_download_(false), | |
| 13 is_sdch_response_(false), | |
| 14 response_code_(-1) { | |
| 15 } | |
| 16 | |
| 17 MockFilterContext::~MockFilterContext() {} | |
| 18 | |
| 19 bool MockFilterContext::GetMimeType(std::string* mime_type) const { | |
| 20 *mime_type = mime_type_; | |
| 21 return true; | |
| 22 } | |
| 23 | |
| 24 // What URL was used to access this data? | |
| 25 // Return false if gurl is not present. | |
| 26 bool MockFilterContext::GetURL(GURL* gurl) const { | |
| 27 *gurl = gurl_; | |
|
willchan no longer on Chromium
2011/01/25 23:47:39
I think you need to #include "googleurl/src/gurl.h
| |
| 28 return true; | |
| 29 } | |
| 30 | |
| 31 // What was this data requested from a server? | |
| 32 base::Time MockFilterContext::GetRequestTime() const { | |
| 33 return request_time_; | |
| 34 } | |
| 35 | |
| 36 bool MockFilterContext::IsCachedContent() const { return is_cached_content_; } | |
| 37 | |
| 38 bool MockFilterContext::IsDownload() const { return is_download_; } | |
| 39 | |
| 40 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; } | |
| 41 | |
| 42 int64 MockFilterContext::GetByteReadCount() const { return 0; } | |
| 43 | |
| 44 int MockFilterContext::GetResponseCode() const { return response_code_; } | |
| 45 | |
| 46 int MockFilterContext::GetInputStreamBufferSize() const { return buffer_size_; } | |
| 47 | |
| 48 } // namespace net | |
| OLD | NEW |