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

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

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MANAGER_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // thread. 87 // thread.
88 bool SupportsSpdy(const HostPortPair& server) override; 88 bool SupportsSpdy(const HostPortPair& server) override;
89 89
90 // Add |server| as the SPDY server which supports SPDY protocol into the 90 // Add |server| as the SPDY server which supports SPDY protocol into the
91 // persisitent store. Should only be called from IO thread. 91 // persisitent store. Should only be called from IO thread.
92 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override; 92 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
93 93
94 // Returns true if |server| has an Alternate-Protocol header. 94 // Returns true if |server| has an Alternate-Protocol header.
95 bool HasAlternateProtocol(const HostPortPair& server) override; 95 bool HasAlternateProtocol(const HostPortPair& server) override;
96 96
97 // Returns the Alternate-Protocol and port for |server|. 97 // Returns the Alternate-Protocols for |server|.
98 // HasAlternateProtocol(server) must be true. 98 // HasAlternateProtocol(server) must be true.
99 AlternateProtocolInfo GetAlternateProtocol( 99 const AlternateProtocols& GetAlternateProtocols(
100 const HostPortPair& server) override; 100 const HostPortPair& server) override;
101 101
102 // Sets the Alternate-Protocol for |server|. 102 // Adds an Alternate-Protocol for |server|.
103 void SetAlternateProtocol(const HostPortPair& server, 103 void AddAlternateProtocol(const HostPortPair& server,
104 uint16 alternate_port, 104 uint16 alternate_port,
105 AlternateProtocol alternate_protocol, 105 AlternateProtocol alternate_protocol,
106 double alternate_probability) override; 106 double alternate_probability) override;
107 107
108 // Sets the Alternate-Protocol for |server| to be BROKEN. 108 // Sets a given Alternate-Protocol for |server| to be BROKEN.
109 void SetBrokenAlternateProtocol(const HostPortPair& server) override; 109 void SetBrokenAlternateProtocol(
110 const HostPortPair& server,
111 const AlternateProtocolInfo& broken_alternate_protocol) override;
110 112
111 // Returns true if Alternate-Protocol for |server| was recently BROKEN. 113 // Returns true if given Alternate-Protocol for |server| was recently BROKEN.
112 bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override; 114 bool WasAlternateProtocolRecentlyBroken(
115 const HostPortPair& server,
116 const AlternateProtocolInfo& alternate_protocol) override;
113 117
114 // Confirms that Alternate-Protocol for |server| is working. 118 // Confirms that given Alternate-Protocol for |server| is working.
115 void ConfirmAlternateProtocol(const HostPortPair& server) override; 119 void ConfirmAlternateProtocol(
120 const HostPortPair& server,
121 const AlternateProtocolInfo& alternate_protocol) override;
116 122
117 // Clears the Alternate-Protocol for |server|. 123 // Clears all Alternate-Protocols for |server|.
118 void ClearAlternateProtocol(const HostPortPair& server) override; 124 void ClearAlternateProtocol(const HostPortPair& server) override;
119 125
126 // Removes an Alternate-Protocol for |server|.
127 void RemoveAlternateProtocol(
128 const HostPortPair& server,
129 const AlternateProtocolInfo& alternate_protocol) override;
130
120 // Returns all Alternate-Protocol mappings. 131 // Returns all Alternate-Protocol mappings.
121 const AlternateProtocolMap& alternate_protocol_map() const override; 132 const AlternateProtocolMap& alternate_protocol_map() const override;
122 133
123 void SetAlternateProtocolProbabilityThreshold(double threshold) override; 134 void SetAlternateProtocolProbabilityThreshold(double threshold) override;
124 135
125 // Gets a reference to the SettingsMap stored for a host. 136 // Gets a reference to the SettingsMap stored for a host.
126 // If no settings are stored, returns an empty SettingsMap. 137 // If no settings are stored, returns an empty SettingsMap.
127 const SettingsMap& GetSpdySettings( 138 const SettingsMap& GetSpdySettings(
128 const HostPortPair& host_port_pair) override; 139 const HostPortPair& host_port_pair) override;
129 140
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // Used to get |weak_ptr_| to self on the network thread. 266 // Used to get |weak_ptr_| to self on the network thread.
256 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > 267 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
257 network_weak_ptr_factory_; 268 network_weak_ptr_factory_;
258 269
259 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 270 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
260 }; 271 };
261 272
262 } // namespace net 273 } // namespace net
263 274
264 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 275 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698