OLD | NEW |
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 #ifndef NET_FILTER_MOCK_FILTER_CONTEXT_H_ | 5 #ifndef NET_FILTER_MOCK_FILTER_CONTEXT_H_ |
6 #define NET_FILTER_MOCK_FILTER_CONTEXT_H_ | 6 #define NET_FILTER_MOCK_FILTER_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "net/base/net_log.h" |
11 #include "net/filter/filter.h" | 12 #include "net/filter/filter.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 | 14 |
14 namespace net { | 15 namespace net { |
15 | 16 |
16 class URLRequestContext; | 17 class URLRequestContext; |
17 | 18 |
18 class MockFilterContext : public FilterContext { | 19 class MockFilterContext : public FilterContext { |
19 public: | 20 public: |
20 MockFilterContext(); | 21 MockFilterContext(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // How many bytes were fed to filter(s) so far? | 62 // How many bytes were fed to filter(s) so far? |
62 virtual int64 GetByteReadCount() const OVERRIDE; | 63 virtual int64 GetByteReadCount() const OVERRIDE; |
63 | 64 |
64 virtual int GetResponseCode() const OVERRIDE; | 65 virtual int GetResponseCode() const OVERRIDE; |
65 | 66 |
66 // The URLRequestContext associated with the request. | 67 // The URLRequestContext associated with the request. |
67 virtual const URLRequestContext* GetURLRequestContext() const OVERRIDE; | 68 virtual const URLRequestContext* GetURLRequestContext() const OVERRIDE; |
68 | 69 |
69 virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE {} | 70 virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE {} |
70 | 71 |
| 72 virtual void LogSdchProblem( |
| 73 SdchManager::ProblemCodes problem) const OVERRIDE {} |
| 74 |
71 private: | 75 private: |
72 int buffer_size_; | 76 int buffer_size_; |
73 std::string mime_type_; | 77 std::string mime_type_; |
74 std::string content_disposition_; | 78 std::string content_disposition_; |
75 GURL gurl_; | 79 GURL gurl_; |
76 base::Time request_time_; | 80 base::Time request_time_; |
77 bool is_cached_content_; | 81 bool is_cached_content_; |
78 bool is_download_; | 82 bool is_download_; |
79 bool is_sdch_response_; | 83 bool is_sdch_response_; |
80 int response_code_; | 84 int response_code_; |
81 scoped_ptr<URLRequestContext> context_; | 85 scoped_ptr<URLRequestContext> context_; |
| 86 BoundNetLog net_log_; |
82 | 87 |
83 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); | 88 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); |
84 }; | 89 }; |
85 | 90 |
86 } // namespace net | 91 } // namespace net |
87 | 92 |
88 #endif // NET_FILTER_MOCK_FILTER_CONTEXT_H_ | 93 #endif // NET_FILTER_MOCK_FILTER_CONTEXT_H_ |
OLD | NEW |