| 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_HTTP_RESPONSE_CACHE_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_HTTP_RESPONSE_CACHE_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_HTTP_RESPONSE_CACHE_H_ | 6 #define NET_TOOLS_QUIC_QUIC_HTTP_RESPONSE_CACHE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <unordered_map> | 12 #include <unordered_map> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "net/quic/core/spdy_utils.h" | 17 #include "net/quic/core/spdy_utils.h" |
| 18 #include "net/quic/platform/api/quic_mutex.h" | 18 #include "net/quic/platform/api/quic_mutex.h" |
| 19 #include "net/quic/platform/api/quic_string_piece.h" | 19 #include "net/quic/platform/api/quic_string_piece.h" |
| 20 #include "net/quic/platform/api/quic_url.h" | 20 #include "net/quic/platform/api/quic_url.h" |
| 21 #include "net/spdy/spdy_framer.h" | 21 #include "net/spdy/core/spdy_framer.h" |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 // In-memory cache for HTTP responses. | 25 // In-memory cache for HTTP responses. |
| 26 // Reads from disk cache generated by: | 26 // Reads from disk cache generated by: |
| 27 // `wget -p --save_headers <url>` | 27 // `wget -p --save_headers <url>` |
| 28 class QuicHttpResponseCache { | 28 class QuicHttpResponseCache { |
| 29 public: | 29 public: |
| 30 // A ServerPushInfo contains path of the push request and everything needed in | 30 // A ServerPushInfo contains path of the push request and everything needed in |
| 31 // comprising a response for the push request. | 31 // comprising a response for the push request. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // Protects against concurrent access from test threads setting responses, and | 214 // Protects against concurrent access from test threads setting responses, and |
| 215 // server threads accessing those responses. | 215 // server threads accessing those responses. |
| 216 mutable QuicMutex response_mutex_; | 216 mutable QuicMutex response_mutex_; |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(QuicHttpResponseCache); | 218 DISALLOW_COPY_AND_ASSIGN(QuicHttpResponseCache); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace net | 221 } // namespace net |
| 222 | 222 |
| 223 #endif // NET_TOOLS_QUIC_QUIC_HTTP_RESPONSE_CACHE_H_ | 223 #endif // NET_TOOLS_QUIC_QUIC_HTTP_RESPONSE_CACHE_H_ |
| OLD | NEW |