| OLD | NEW |
| 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 CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| 6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 6 #define CHROME_BROWSER_NET_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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Add |server| as the SPDY server which supports SPDY protocol into the | 93 // Add |server| as the SPDY server which supports SPDY protocol into the |
| 94 // persisitent store. Should only be called from IO thread. | 94 // persisitent store. Should only be called from IO thread. |
| 95 virtual void SetSupportsSpdy(const net::HostPortPair& server, | 95 virtual void SetSupportsSpdy(const net::HostPortPair& server, |
| 96 bool support_spdy) OVERRIDE; | 96 bool support_spdy) OVERRIDE; |
| 97 | 97 |
| 98 // Returns true if |server| has an Alternate-Protocol header. | 98 // Returns true if |server| has an Alternate-Protocol header. |
| 99 virtual bool HasAlternateProtocol(const net::HostPortPair& server) OVERRIDE; | 99 virtual bool HasAlternateProtocol(const net::HostPortPair& server) OVERRIDE; |
| 100 | 100 |
| 101 // Returns the Alternate-Protocol and port for |server|. | 101 // Returns the Alternate-Protocol and port for |server|. |
| 102 // HasAlternateProtocol(server) must be true. | 102 // HasAlternateProtocol(server) must be true. |
| 103 virtual net::PortAlternateProtocolPair GetAlternateProtocol( | 103 virtual net::AlternateProtocolInfo GetAlternateProtocol( |
| 104 const net::HostPortPair& server) OVERRIDE; | 104 const net::HostPortPair& server) OVERRIDE; |
| 105 | 105 |
| 106 // Sets the Alternate-Protocol for |server|. | 106 // Sets the Alternate-Protocol for |server|. |
| 107 virtual void SetAlternateProtocol( | 107 virtual void SetAlternateProtocol( |
| 108 const net::HostPortPair& server, | 108 const net::HostPortPair& server, |
| 109 uint16 alternate_port, | 109 uint16 alternate_port, |
| 110 net::AlternateProtocol alternate_protocol) OVERRIDE; | 110 net::AlternateProtocol alternate_protocol, |
| 111 double alternate_probability) OVERRIDE; |
| 111 | 112 |
| 112 // Sets the Alternate-Protocol for |server| to be BROKEN. | 113 // Sets the Alternate-Protocol for |server| to be BROKEN. |
| 113 virtual void SetBrokenAlternateProtocol( | 114 virtual void SetBrokenAlternateProtocol( |
| 114 const net::HostPortPair& server) OVERRIDE; | 115 const net::HostPortPair& server) OVERRIDE; |
| 115 | 116 |
| 116 // Returns true if Alternate-Protocol for |server| was recently BROKEN. | 117 // Returns true if Alternate-Protocol for |server| was recently BROKEN. |
| 117 virtual bool WasAlternateProtocolRecentlyBroken( | 118 virtual bool WasAlternateProtocolRecentlyBroken( |
| 118 const net::HostPortPair& server) OVERRIDE; | 119 const net::HostPortPair& server) OVERRIDE; |
| 119 | 120 |
| 120 // Confirms that Alternate-Protocol for |server| is working. | 121 // Confirms that Alternate-Protocol for |server| is working. |
| 121 virtual void ConfirmAlternateProtocol( | 122 virtual void ConfirmAlternateProtocol( |
| 122 const net::HostPortPair& server) OVERRIDE; | 123 const net::HostPortPair& server) OVERRIDE; |
| 123 | 124 |
| 124 // Clears the Alternate-Protocol for |server|. | 125 // Clears the Alternate-Protocol for |server|. |
| 125 virtual void ClearAlternateProtocol(const net::HostPortPair& server) OVERRIDE; | 126 virtual void ClearAlternateProtocol(const net::HostPortPair& server) OVERRIDE; |
| 126 | 127 |
| 127 // Returns all Alternate-Protocol mappings. | 128 // Returns all Alternate-Protocol mappings. |
| 128 virtual const net::AlternateProtocolMap& | 129 virtual const net::AlternateProtocolMap& |
| 129 alternate_protocol_map() const OVERRIDE; | 130 alternate_protocol_map() const OVERRIDE; |
| 130 | 131 |
| 131 virtual void SetAlternateProtocolExperiment( | 132 virtual void SetAlternateProtocolExperiment( |
| 132 net::AlternateProtocolExperiment experiment) OVERRIDE; | 133 net::AlternateProtocolExperiment experiment) OVERRIDE; |
| 133 | 134 |
| 135 virtual void SetAlternateProtocolProbabilityThreshold( |
| 136 double threshold) OVERRIDE; |
| 137 |
| 134 virtual net::AlternateProtocolExperiment GetAlternateProtocolExperiment() | 138 virtual net::AlternateProtocolExperiment GetAlternateProtocolExperiment() |
| 135 const OVERRIDE; | 139 const OVERRIDE; |
| 136 | 140 |
| 137 // Gets a reference to the SettingsMap stored for a host. | 141 // Gets a reference to the SettingsMap stored for a host. |
| 138 // If no settings are stored, returns an empty SettingsMap. | 142 // If no settings are stored, returns an empty SettingsMap. |
| 139 virtual const net::SettingsMap& GetSpdySettings( | 143 virtual const net::SettingsMap& GetSpdySettings( |
| 140 const net::HostPortPair& host_port_pair) OVERRIDE; | 144 const net::HostPortPair& host_port_pair) OVERRIDE; |
| 141 | 145 |
| 142 // Saves an individual SPDY setting for a host. Returns true if SPDY setting | 146 // Saves an individual SPDY setting for a host. Returns true if SPDY setting |
| 143 // is to be persisted. | 147 // is to be persisted. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 io_prefs_update_timer_; | 254 io_prefs_update_timer_; |
| 251 | 255 |
| 252 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; | 256 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; |
| 253 | 257 |
| 254 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 255 }; | 259 }; |
| 256 | 260 |
| 257 } // namespace chrome_browser_net | 261 } // namespace chrome_browser_net |
| 258 | 262 |
| 259 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 263 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |