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

Side by Side Diff: net/http/http_server_properties.h

Issue 2808843002: Add operator<<(ostream, AlternativeService) for test output formatting. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | net/http/http_server_properties.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_HTTP_HTTP_SERVER_PROPERTIES_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <ostream>
11 #include <string> 12 #include <string>
12 #include <tuple> 13 #include <tuple>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/containers/mru_cache.h" 16 #include "base/containers/mru_cache.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/time/time.h" 18 #include "base/time/time.h"
18 #include "net/base/host_port_pair.h" 19 #include "net/base/host_port_pair.h"
19 #include "net/base/net_export.h" 20 #include "net/base/net_export.h"
20 #include "net/quic/core/quic_bandwidth.h" 21 #include "net/quic/core/quic_bandwidth.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 std::tie(other.protocol, other.host, other.port); 103 std::tie(other.protocol, other.host, other.port);
103 } 104 }
104 105
105 std::string ToString() const; 106 std::string ToString() const;
106 107
107 NextProto protocol; 108 NextProto protocol;
108 std::string host; 109 std::string host;
109 uint16_t port; 110 uint16_t port;
110 }; 111 };
111 112
113 NET_EXPORT_PRIVATE std::ostream& operator<<(
114 std::ostream& os,
115 const AlternativeService& alternative_service);
116
112 struct NET_EXPORT AlternativeServiceInfo { 117 struct NET_EXPORT AlternativeServiceInfo {
113 AlternativeServiceInfo() : alternative_service() {} 118 AlternativeServiceInfo() : alternative_service() {}
114 119
115 AlternativeServiceInfo(const AlternativeService& alternative_service, 120 AlternativeServiceInfo(const AlternativeService& alternative_service,
116 base::Time expiration) 121 base::Time expiration)
117 : alternative_service(alternative_service), 122 : alternative_service(alternative_service),
118 expiration(expiration) {} 123 expiration(expiration) {}
119 124
120 AlternativeServiceInfo(NextProto protocol, 125 AlternativeServiceInfo(NextProto protocol,
121 const std::string& host, 126 const std::string& host,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // Returns whether HttpServerProperties is initialized. 337 // Returns whether HttpServerProperties is initialized.
333 virtual bool IsInitialized() const = 0; 338 virtual bool IsInitialized() const = 0;
334 339
335 private: 340 private:
336 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 341 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
337 }; 342 };
338 343
339 } // namespace net 344 } // namespace net
340 345
341 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 346 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698