OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tools/flip_server/mem_cache.h" | 5 #include "net/tools/flip_server/mem_cache.h" |
6 | 6 |
7 #include <dirent.h> | 7 #include <dirent.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 #include <sys/stat.h> | 11 #include <sys/stat.h> |
12 #include <sys/types.h> | 12 #include <sys/types.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 | 14 |
15 #include <deque> | 15 #include <deque> |
16 #include <map> | 16 #include <map> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
| 20 #include "net/tools/balsa/balsa_frame.h" |
| 21 #include "net/tools/balsa/balsa_headers.h" |
20 #include "net/tools/dump_cache/url_to_filename_encoder.h" | 22 #include "net/tools/dump_cache/url_to_filename_encoder.h" |
21 #include "net/tools/dump_cache/url_utilities.h" | 23 #include "net/tools/dump_cache/url_utilities.h" |
22 #include "net/tools/flip_server/balsa_frame.h" | |
23 #include "net/tools/flip_server/balsa_headers.h" | |
24 | 24 |
25 namespace { | 25 namespace { |
26 // The directory where cache locates); | 26 // The directory where cache locates); |
27 const char FLAGS_cache_base_dir[] = "."; | 27 const char FLAGS_cache_base_dir[] = "."; |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace net { | 30 namespace net { |
31 | 31 |
32 void StoreBodyAndHeadersVisitor::ProcessBodyData(const char *input, | 32 void StoreBodyAndHeadersVisitor::ProcessBodyData(const char *input, |
33 size_t size) { | 33 size_t size) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 248 } |
249 | 249 |
250 void MemoryCache::ClearFiles() { | 250 void MemoryCache::ClearFiles() { |
251 for (Files::const_iterator i = files_.begin(); i != files_.end(); ++i) { | 251 for (Files::const_iterator i = files_.begin(); i != files_.end(); ++i) { |
252 delete i->second; | 252 delete i->second; |
253 } | 253 } |
254 files_.clear(); | 254 files_.clear(); |
255 } | 255 } |
256 | 256 |
257 } // namespace net | 257 } // namespace net |
OLD | NEW |