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

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

Issue 1458163002: Remove |using base::StringPiece| from net/spdy header files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/tools/flip_server/spdy_interface.h ('k') | no next file » | 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 28 matching lines...) Expand all
39 }; 39 };
40 40
41 // Container for response header/body pairs. 41 // Container for response header/body pairs.
42 class Response { 42 class Response {
43 public: 43 public:
44 Response(); 44 Response();
45 ~Response(); 45 ~Response();
46 46
47 SpecialResponseType response_type() const { return response_type_; } 47 SpecialResponseType response_type() const { return response_type_; }
48 const SpdyHeaderBlock& headers() const { return headers_; } 48 const SpdyHeaderBlock& headers() const { return headers_; }
49 const StringPiece body() const { return StringPiece(body_); } 49 const base::StringPiece body() const { return base::StringPiece(body_); }
50 50
51 void set_response_type(SpecialResponseType response_type) { 51 void set_response_type(SpecialResponseType response_type) {
52 response_type_ = response_type; 52 response_type_ = response_type;
53 } 53 }
54 void set_headers(const SpdyHeaderBlock& headers) { 54 void set_headers(const SpdyHeaderBlock& headers) {
55 headers_ = headers; 55 headers_ = headers;
56 } 56 }
57 void set_body(base::StringPiece body) { 57 void set_body(base::StringPiece body) {
58 body.CopyToString(&body_); 58 body.CopyToString(&body_);
59 } 59 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // The default response for cache misses, if set. 124 // The default response for cache misses, if set.
125 scoped_ptr<Response> default_response_; 125 scoped_ptr<Response> default_response_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache); 127 DISALLOW_COPY_AND_ASSIGN(QuicInMemoryCache);
128 }; 128 };
129 129
130 } // namespace tools 130 } // namespace tools
131 } // namespace net 131 } // namespace net
132 132
133 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_ 133 #endif // NET_TOOLS_QUIC_QUIC_IN_MEMORY_CACHE_H_
OLDNEW
« no previous file with comments | « net/tools/flip_server/spdy_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698