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_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 5 #ifndef NET_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
6 #define NET_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 6 #define NET_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "base/file_util.h" | |
11 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
12 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
13 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
14 #include "net/tools/balsa/balsa_frame.h" | 15 #include "net/tools/balsa/balsa_frame.h" |
15 #include "net/tools/balsa/balsa_headers.h" | 16 #include "net/tools/balsa/balsa_headers.h" |
16 #include "net/tools/balsa/noop_balsa_visitor.h" | 17 #include "net/tools/balsa/noop_balsa_visitor.h" |
17 | 18 |
18 template <typename T> struct DefaultSingletonTraits; | 19 template <typename T> struct DefaultSingletonTraits; |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
23 extern base::FilePath::StringType g_quic_in_memory_cache_dir; | |
wtc
2014/06/20 21:40:49
Why does g_quic_in_memory_cache_dir need to be a s
dmziegler
2014/06/23 18:31:23
So that it can be set.
| |
24 | |
22 namespace test { | 25 namespace test { |
23 class QuicInMemoryCachePeer; | 26 class QuicInMemoryCachePeer; |
24 } // namespace | 27 } // namespace |
25 | 28 |
26 class QuicServer; | 29 class QuicServer; |
27 | 30 |
28 // In-memory cache for HTTP responses. | 31 // In-memory cache for HTTP responses. |
29 // Reads from disk cache generated by: | 32 // Reads from disk cache generated by: |
30 // `wget -p --save_headers <url>` | 33 // `wget -p --save_headers <url>` |
31 class QuicInMemoryCache { | 34 class QuicInMemoryCache { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 | 110 |
108 // Cached responses. | 111 // Cached responses. |
109 ResponseMap responses_; | 112 ResponseMap responses_; |
110 | 113 |
111 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); | 114 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); |
112 }; | 115 }; |
113 | 116 |
114 } // namespace net | 117 } // namespace net |
115 | 118 |
116 #endif // NET_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 119 #endif // NET_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
OLD | NEW |