OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TOOLS_FLIP_SERVER_MEM_CACHE_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_MEM_CACHE_H_ |
6 #define NET_TOOLS_FLIP_SERVER_MEM_CACHE_H_ | 6 #define NET_TOOLS_FLIP_SERVER_MEM_CACHE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "net/tools/balsa/balsa_headers.h" | 13 #include "net/tools/balsa/balsa_headers.h" |
14 #include "net/tools/balsa/balsa_visitor_interface.h" | 14 #include "net/tools/balsa/balsa_visitor_interface.h" |
15 #include "net/tools/flip_server/constants.h" | 15 #include "net/tools/flip_server/constants.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 class StoreBodyAndHeadersVisitor : public BalsaVisitorInterface { | 19 class StoreBodyAndHeadersVisitor : public BalsaVisitorInterface { |
20 public: | 20 public: |
| 21 StoreBodyAndHeadersVisitor(); |
| 22 |
21 void HandleError() { error_ = true; } | 23 void HandleError() { error_ = true; } |
22 | 24 |
23 // BalsaVisitorInterface: | 25 // BalsaVisitorInterface: |
24 void ProcessBodyInput(const char* input, size_t size) override {} | 26 void ProcessBodyInput(const char* input, size_t size) override {} |
25 void ProcessBodyData(const char* input, size_t size) override; | 27 void ProcessBodyData(const char* input, size_t size) override; |
26 void ProcessHeaderInput(const char* input, size_t size) override {} | 28 void ProcessHeaderInput(const char* input, size_t size) override {} |
27 void ProcessTrailerInput(const char* input, size_t size) override {} | 29 void ProcessTrailerInput(const char* input, size_t size) override {} |
28 void ProcessHeaders(const BalsaHeaders& headers) override { | 30 void ProcessHeaders(const BalsaHeaders& headers) override { |
29 // nothing to do here-- we're assuming that the BalsaFrame has | 31 // nothing to do here-- we're assuming that the BalsaFrame has |
30 // been handed our headers. | 32 // been handed our headers. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 146 |
145 class NotifierInterface { | 147 class NotifierInterface { |
146 public: | 148 public: |
147 virtual ~NotifierInterface() {} | 149 virtual ~NotifierInterface() {} |
148 virtual void Notify() = 0; | 150 virtual void Notify() = 0; |
149 }; | 151 }; |
150 | 152 |
151 } // namespace net | 153 } // namespace net |
152 | 154 |
153 #endif // NET_TOOLS_FLIP_SERVER_MEM_CACHE_H_ | 155 #endif // NET_TOOLS_FLIP_SERVER_MEM_CACHE_H_ |
OLD | NEW |