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

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

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/http_server_properties_manager.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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Confirms that Alternate-Protocol for |server| is working. 114 // Confirms that Alternate-Protocol for |server| is working.
115 void ConfirmAlternateProtocol(const HostPortPair& server) override; 115 void ConfirmAlternateProtocol(const HostPortPair& server) override;
116 116
117 // Clears the Alternate-Protocol for |server|. 117 // Clears the Alternate-Protocol for |server|.
118 void ClearAlternateProtocol(const HostPortPair& server) override; 118 void ClearAlternateProtocol(const HostPortPair& server) override;
119 119
120 // Returns all Alternate-Protocol mappings. 120 // Returns all Alternate-Protocol mappings.
121 const AlternateProtocolMap& alternate_protocol_map() const override; 121 const AlternateProtocolMap& alternate_protocol_map() const override;
122 122
123 void SetAlternateProtocolExperiment(
124 AlternateProtocolExperiment experiment) override;
125
126 void SetAlternateProtocolProbabilityThreshold(double threshold) override; 123 void SetAlternateProtocolProbabilityThreshold(double threshold) override;
127 124
128 AlternateProtocolExperiment GetAlternateProtocolExperiment() const override;
129
130 // Gets a reference to the SettingsMap stored for a host. 125 // Gets a reference to the SettingsMap stored for a host.
131 // If no settings are stored, returns an empty SettingsMap. 126 // If no settings are stored, returns an empty SettingsMap.
132 const SettingsMap& GetSpdySettings( 127 const SettingsMap& GetSpdySettings(
133 const HostPortPair& host_port_pair) override; 128 const HostPortPair& host_port_pair) override;
134 129
135 // Saves an individual SPDY setting for a host. Returns true if SPDY setting 130 // Saves an individual SPDY setting for a host. Returns true if SPDY setting
136 // is to be persisted. 131 // is to be persisted.
137 bool SetSpdySetting(const HostPortPair& host_port_pair, 132 bool SetSpdySetting(const HostPortPair& host_port_pair,
138 SpdySettingsIds id, 133 SpdySettingsIds id,
139 SpdySettingsFlags flags, 134 SpdySettingsFlags flags,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // UpdateSpdyServersFromPrefsOnNetworkThread() to perform the update on 177 // UpdateSpdyServersFromPrefsOnNetworkThread() to perform the update on
183 // network thread. 178 // network thread.
184 virtual void UpdateCacheFromPrefsOnPrefThread(); 179 virtual void UpdateCacheFromPrefsOnPrefThread();
185 180
186 // Starts the update of cached prefs in |http_server_properties_impl_| on the 181 // Starts the update of cached prefs in |http_server_properties_impl_| on the
187 // network thread. Protected for testing. 182 // network thread. Protected for testing.
188 void UpdateCacheFromPrefsOnNetworkThread( 183 void UpdateCacheFromPrefsOnNetworkThread(
189 std::vector<std::string>* spdy_servers, 184 std::vector<std::string>* spdy_servers,
190 SpdySettingsMap* spdy_settings_map, 185 SpdySettingsMap* spdy_settings_map,
191 AlternateProtocolMap* alternate_protocol_map, 186 AlternateProtocolMap* alternate_protocol_map,
192 AlternateProtocolExperiment alternate_protocol_experiment,
193 SupportsQuicMap* supports_quic_map, 187 SupportsQuicMap* supports_quic_map,
194 bool detected_corrupted_prefs); 188 bool detected_corrupted_prefs);
195 189
196 // These are used to delay updating the preferences when cached data in 190 // These are used to delay updating the preferences when cached data in
197 // |http_server_properties_impl_| is changing, and execute only one update per 191 // |http_server_properties_impl_| is changing, and execute only one update per
198 // simultaneous spdy_servers or spdy_settings or alternate_protocol changes. 192 // simultaneous spdy_servers or spdy_settings or alternate_protocol changes.
199 void ScheduleUpdatePrefsOnNetworkThread(); 193 void ScheduleUpdatePrefsOnNetworkThread();
200 194
201 // Starts the timers to update the prefs from cache. This are overridden in 195 // Starts the timers to update the prefs from cache. This are overridden in
202 // tests to prevent the delay. 196 // tests to prevent the delay.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Used to get |weak_ptr_| to self on the network thread. 255 // Used to get |weak_ptr_| to self on the network thread.
262 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > 256 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
263 network_weak_ptr_factory_; 257 network_weak_ptr_factory_;
264 258
265 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 259 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
266 }; 260 };
267 261
268 } // namespace net 262 } // namespace net
269 263
270 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 264 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698