Chromium Code Reviews| Index: net/filter/mock_filter_context.cc |
| diff --git a/net/filter/mock_filter_context.cc b/net/filter/mock_filter_context.cc |
| index eb3484c19eb1eabcbc23a3d2df9e4ab47d8771ea..92c555743828c271354db4b5297547f99316689f 100644 |
| --- a/net/filter/mock_filter_context.cc |
| +++ b/net/filter/mock_filter_context.cc |
| @@ -12,12 +12,18 @@ MockFilterContext::MockFilterContext() |
| : is_cached_content_(false), |
| is_download_(false), |
| is_sdch_response_(false), |
| + ok_to_call_get_url_(true), |
| response_code_(-1), |
| context_(new URLRequestContext()) { |
| } |
| MockFilterContext::~MockFilterContext() {} |
| +void MockFilterContext::NukeUnstableInterfaces() { |
| + context_.reset(); |
|
mef
2014/07/10 16:31:42
I like. :-)
|
| + ok_to_call_get_url_ = false; |
| +} |
| + |
| bool MockFilterContext::GetMimeType(std::string* mime_type) const { |
| *mime_type = mime_type_; |
| return true; |
| @@ -26,6 +32,7 @@ bool MockFilterContext::GetMimeType(std::string* mime_type) const { |
| // What URL was used to access this data? |
| // Return false if gurl is not present. |
| bool MockFilterContext::GetURL(GURL* gurl) const { |
| + DCHECK(ok_to_call_get_url_); |
| *gurl = gurl_; |
| return true; |
| } |