Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: net/tools/quic/quic_in_memory_cache.h

Issue 13741012: Moving net/tools/quic code to net::tools namspace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_epoll_connection_helper.cc ('k') | net/tools/quic/quic_in_memory_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/string_piece.h" 12 #include "base/string_piece.h"
13 #include "net/tools/flip_server/balsa_frame.h" 13 #include "net/tools/flip_server/balsa_frame.h"
14 #include "net/tools/flip_server/balsa_headers.h" 14 #include "net/tools/flip_server/balsa_headers.h"
15 15
16 template <typename T> struct DefaultSingletonTraits; 16 template <typename T> struct DefaultSingletonTraits;
17 17
18 namespace net { 18 namespace net {
19 namespace tools {
19 20
20 class QuicServer; 21 class QuicServer;
21 22
22 // In-memory cache for HTTP responses. 23 // In-memory cache for HTTP responses.
23 // Reads from disk cache generated by: 24 // Reads from disk cache generated by:
24 // `wget -p --save_headers <url>` 25 // `wget -p --save_headers <url>`
25 class QuicInMemoryCache { 26 class QuicInMemoryCache {
26 public: 27 public:
27 // Container for response header/body pairs. 28 // Container for response header/body pairs.
28 class Response { 29 class Response {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ~QuicInMemoryCache(); 70 ~QuicInMemoryCache();
70 71
71 std::string GetKey(const BalsaHeaders& response_headers) const; 72 std::string GetKey(const BalsaHeaders& response_headers) const;
72 73
73 // Cached responses. 74 // Cached responses.
74 ResponseMap responses_; 75 ResponseMap responses_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); 77 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache);
77 }; 78 };
78 79
80 } // namespace tools
79 } // namespace net 81 } // namespace net
80 82
81 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ 83 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_epoll_connection_helper.cc ('k') | net/tools/quic/quic_in_memory_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698