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

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

Issue 1032903002: Unify various QUIC server classes in net/quic and net/tools/quic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « net/spdy/spdy_http_utils.h ('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/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 22 matching lines...) Expand all
33 CLOSE_CONNECTION, // Close the connection (sending the close packet). 33 CLOSE_CONNECTION, // Close the connection (sending the close packet).
34 IGNORE_REQUEST, // Do nothing, expect the client to time out. 34 IGNORE_REQUEST, // Do nothing, expect the client to time out.
35 }; 35 };
36 36
37 // Container for response header/body pairs. 37 // Container for response header/body pairs.
38 class Response { 38 class Response {
39 public: 39 public:
40 Response(); 40 Response();
41 ~Response(); 41 ~Response();
42 42
43 const SpecialResponseType response_type() const { return response_type_; } 43 SpecialResponseType response_type() const { return response_type_; }
44 const SpdyHeaderBlock& headers() const { return headers_; } 44 const SpdyHeaderBlock& headers() const { return headers_; }
45 const StringPiece body() const { return StringPiece(body_); } 45 const StringPiece body() const { return StringPiece(body_); }
46 46
47 private: 47 private:
48 friend class QuicInMemoryCache; 48 friend class QuicInMemoryCache;
49 49
50 void set_response_type(SpecialResponseType response_type) { 50 void set_response_type(SpecialResponseType response_type) {
51 response_type_ = response_type; 51 response_type_ = response_type;
52 } 52 }
53 void set_headers(const SpdyHeaderBlock& headers) { 53 void set_headers(const SpdyHeaderBlock& headers) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Cached responses. 115 // Cached responses.
116 ResponseMap responses_; 116 ResponseMap responses_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); 118 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache);
119 }; 119 };
120 120
121 } // namespace tools 121 } // namespace tools
122 } // namespace net 122 } // namespace net
123 123
124 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ 124 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_utils.h ('k') | net/tools/quic/quic_in_memory_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698