Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: net/filter/mock_filter_context.cc

Issue 1431723002: Add brotli content-encoding filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Accept-Ecnoding test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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/filter/mock_filter_context.h" 5 #include "net/filter/mock_filter_context.h"
6 6
7 #include "net/url_request/url_request_context.h" 7 #include "net/url_request/url_request_context.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 MockFilterContext::MockFilterContext() 11 MockFilterContext::MockFilterContext()
12 : is_cached_content_(false), 12 : is_cached_content_(false),
13 ok_to_call_get_url_(true), 13 ok_to_call_get_url_(true),
14 response_code_(-1), 14 response_code_(-1),
15 context_(new URLRequestContext()) { 15 context_(new URLRequestContext()),
16 } 16 is_brotli_enabled_(false) {}
17 17
18 MockFilterContext::~MockFilterContext() {} 18 MockFilterContext::~MockFilterContext() {}
19 19
20 void MockFilterContext::NukeUnstableInterfaces() { 20 void MockFilterContext::NukeUnstableInterfaces() {
21 context_.reset(); 21 context_.reset();
22 ok_to_call_get_url_ = false; 22 ok_to_call_get_url_ = false;
23 request_time_ = base::Time(); 23 request_time_ = base::Time();
24 } 24 }
25 25
26 bool MockFilterContext::GetMimeType(std::string* mime_type) const { 26 bool MockFilterContext::GetMimeType(std::string* mime_type) const {
(...skipping 26 matching lines...) Expand all
53 int MockFilterContext::GetResponseCode() const { return response_code_; } 53 int MockFilterContext::GetResponseCode() const { return response_code_; }
54 54
55 const URLRequestContext* MockFilterContext::GetURLRequestContext() const { 55 const URLRequestContext* MockFilterContext::GetURLRequestContext() const {
56 return context_.get(); 56 return context_.get();
57 } 57 }
58 58
59 const BoundNetLog& MockFilterContext::GetNetLog() const { 59 const BoundNetLog& MockFilterContext::GetNetLog() const {
60 return net_log_; 60 return net_log_;
61 } 61 }
62 62
63 bool MockFilterContext::IsBrotliEnabled() const {
64 return is_brotli_enabled_;
65 }
66
63 } // namespace net 67 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698