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
3 // found in the LICENSE file.
5 #include "net/filter/mock_filter_context.h"
9 MockFilterContext::MockFilterContext()
10 : is_cached_content_(false),
12 is_sdch_response_(false),
16 MockFilterContext::~MockFilterContext() {}
18 bool MockFilterContext::GetMimeType(std::string
* mime_type
) const {
19 *mime_type
= mime_type_
;
23 // What URL was used to access this data?
24 // Return false if gurl is not present.
25 bool MockFilterContext::GetURL(GURL
* gurl
) const {
30 bool MockFilterContext::GetContentDisposition(std::string
* disposition
) const {
31 if (content_disposition_
.empty())
33 *disposition
= content_disposition_
;
37 // What was this data requested from a server?
38 base::Time
MockFilterContext::GetRequestTime() const {
42 bool MockFilterContext::IsCachedContent() const { return is_cached_content_
; }
44 bool MockFilterContext::IsDownload() const { return is_download_
; }
46 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_
; }
48 int64
MockFilterContext::GetByteReadCount() const { return 0; }
50 int MockFilterContext::GetResponseCode() const { return response_code_
; }