This source file includes following definitions.
- response_code_
- GetMimeType
- GetURL
- GetContentDisposition
- GetRequestTime
- IsCachedContent
- IsDownload
- IsSdchResponse
- GetByteReadCount
- GetResponseCode
#include "net/filter/mock_filter_context.h"
namespace net {
MockFilterContext::MockFilterContext()
: is_cached_content_(false),
is_download_(false),
is_sdch_response_(false),
response_code_(-1) {
}
MockFilterContext::~MockFilterContext() {}
bool MockFilterContext::GetMimeType(std::string* mime_type) const {
*mime_type = mime_type_;
return true;
}
bool MockFilterContext::GetURL(GURL* gurl) const {
*gurl = gurl_;
return true;
}
bool MockFilterContext::GetContentDisposition(std::string* disposition) const {
if (content_disposition_.empty())
return false;
*disposition = content_disposition_;
return true;
}
base::Time MockFilterContext::GetRequestTime() const {
return request_time_;
}
bool MockFilterContext::IsCachedContent() const { return is_cached_content_; }
bool MockFilterContext::IsDownload() const { return is_download_; }
bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; }
int64 MockFilterContext::GetByteReadCount() const { return 0; }
int MockFilterContext::GetResponseCode() const { return response_code_; }
}