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

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 BrotliSlowRead to u_r_j_unittest 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 }
17 16
18 MockFilterContext::~MockFilterContext() {} 17 MockFilterContext::~MockFilterContext() {}
19 18
20 void MockFilterContext::NukeUnstableInterfaces() { 19 void MockFilterContext::NukeUnstableInterfaces() {
21 context_.reset(); 20 context_.reset();
22 ok_to_call_get_url_ = false; 21 ok_to_call_get_url_ = false;
23 request_time_ = base::Time(); 22 request_time_ = base::Time();
24 } 23 }
25 24
26 bool MockFilterContext::GetMimeType(std::string* mime_type) const { 25 bool MockFilterContext::GetMimeType(std::string* mime_type) const {
(...skipping 27 matching lines...) Expand all
54 53
55 const URLRequestContext* MockFilterContext::GetURLRequestContext() const { 54 const URLRequestContext* MockFilterContext::GetURLRequestContext() const {
56 return context_.get(); 55 return context_.get();
57 } 56 }
58 57
59 const BoundNetLog& MockFilterContext::GetNetLog() const { 58 const BoundNetLog& MockFilterContext::GetNetLog() const {
60 return net_log_; 59 return net_log_;
61 } 60 }
62 61
63 } // namespace net 62 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698