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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/http/http_response_info.cc ('k') | net/http/http_server_properties_impl.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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/containers/mru_cache.h" 11 #include "base/containers/mru_cache.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "net/base/host_port_pair.h" 14 #include "net/base/host_port_pair.h"
15 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
16 #include "net/quic/quic_bandwidth.h"
16 #include "net/socket/next_proto.h" 17 #include "net/socket/next_proto.h"
17 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. 18 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
18 #include "net/spdy/spdy_protocol.h" 19 #include "net/spdy/spdy_protocol.h"
19 20
20 namespace net { 21 namespace net {
21 22
22 enum AlternateProtocolUsage { 23 enum AlternateProtocolUsage {
23 // Alternate Protocol was used without racing a normal connection. 24 // Alternate Protocol was used without racing a normal connection.
24 ALTERNATE_PROTOCOL_USAGE_NO_RACE = 0, 25 ALTERNATE_PROTOCOL_USAGE_NO_RACE = 0,
25 // Alternate Protocol was used by winning a race with a normal connection. 26 // Alternate Protocol was used by winning a race with a normal connection.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 extern const char kAlternateProtocolHeader[]; 137 extern const char kAlternateProtocolHeader[];
137 138
138 // The interface for setting/retrieving the HTTP server properties. 139 // The interface for setting/retrieving the HTTP server properties.
139 // Currently, this class manages servers': 140 // Currently, this class manages servers':
140 // * SPDY support (based on NPN results) 141 // * SPDY support (based on NPN results)
141 // * Alternate-Protocol support 142 // * Alternate-Protocol support
142 // * Spdy Settings (like CWND ID field) 143 // * Spdy Settings (like CWND ID field)
143 class NET_EXPORT HttpServerProperties { 144 class NET_EXPORT HttpServerProperties {
144 public: 145 public:
145 struct NetworkStats { 146 struct NetworkStats {
147 NetworkStats() : bandwidth_estimate(QuicBandwidth::Zero()) {}
148
146 base::TimeDelta srtt; 149 base::TimeDelta srtt;
147 uint64 bandwidth_estimate; 150 QuicBandwidth bandwidth_estimate;
148 }; 151 };
149 152
150 HttpServerProperties() {} 153 HttpServerProperties() {}
151 virtual ~HttpServerProperties() {} 154 virtual ~HttpServerProperties() {}
152 155
153 // Gets a weak pointer for this object. 156 // Gets a weak pointer for this object.
154 virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() = 0; 157 virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() = 0;
155 158
156 // Deletes all data. 159 // Deletes all data.
157 virtual void Clear() = 0; 160 virtual void Clear() = 0;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 virtual const NetworkStats* GetServerNetworkStats( 242 virtual const NetworkStats* GetServerNetworkStats(
240 const HostPortPair& host_port_pair) const = 0; 243 const HostPortPair& host_port_pair) const = 0;
241 244
242 private: 245 private:
243 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 246 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
244 }; 247 };
245 248
246 } // namespace net 249 } // namespace net
247 250
248 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 251 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698