| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 6 #define NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 struct DefaultSingletonTraits; | 27 struct DefaultSingletonTraits; |
| 28 | 28 |
| 29 } // namespace base | 29 } // namespace base |
| 30 | 30 |
| 31 namespace net { | 31 namespace net { |
| 32 | 32 |
| 33 namespace test { | 33 namespace test { |
| 34 class QuicInMemoryCachePeer; | 34 class QuicInMemoryCachePeer; |
| 35 } // namespace test | 35 } // namespace test |
| 36 | 36 |
| 37 class QuicServer; | |
| 38 | |
| 39 // In-memory cache for HTTP responses. | 37 // In-memory cache for HTTP responses. |
| 40 // Reads from disk cache generated by: | 38 // Reads from disk cache generated by: |
| 41 // `wget -p --save_headers <url>` | 39 // `wget -p --save_headers <url>` |
| 42 class QuicInMemoryCache { | 40 class QuicInMemoryCache { |
| 43 public: | 41 public: |
| 44 // A ServerPushInfo contains path of the push request and everything needed in | 42 // A ServerPushInfo contains path of the push request and everything needed in |
| 45 // comprising a response for the push request. | 43 // comprising a response for the push request. |
| 46 struct ServerPushInfo { | 44 struct ServerPushInfo { |
| 47 ServerPushInfo(GURL request_url, | 45 ServerPushInfo(GURL request_url, |
| 48 SpdyHeaderBlock headers, | 46 SpdyHeaderBlock headers, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // Protects against concurrent access from test threads setting responses, and | 232 // Protects against concurrent access from test threads setting responses, and |
| 235 // server threads accessing those responses. | 233 // server threads accessing those responses. |
| 236 mutable base::Lock response_mutex_; | 234 mutable base::Lock response_mutex_; |
| 237 | 235 |
| 238 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); | 236 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); |
| 239 }; | 237 }; |
| 240 | 238 |
| 241 } // namespace net | 239 } // namespace net |
| 242 | 240 |
| 243 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ | 241 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ |
| OLD | NEW |