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

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

Issue 890093002: Clean up HttpServerPropertiesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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_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 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void UpdatePrefsOnPrefThread(base::ListValue* spdy_server_list, 174 void UpdatePrefsOnPrefThread(base::ListValue* spdy_server_list,
175 SpdySettingsMap* spdy_settings_map, 175 SpdySettingsMap* spdy_settings_map,
176 AlternateProtocolMap* alternate_protocol_map, 176 AlternateProtocolMap* alternate_protocol_map,
177 SupportsQuicMap* supports_quic_map, 177 SupportsQuicMap* supports_quic_map,
178 ServerNetworkStatsMap* server_network_stats_map, 178 ServerNetworkStatsMap* server_network_stats_map,
179 const base::Closure& completion); 179 const base::Closure& completion);
180 180
181 private: 181 private:
182 void OnHttpServerPropertiesChanged(); 182 void OnHttpServerPropertiesChanged();
183 183
184 void AddToSpdySettingsMap(const HostPortPair& server,
185 const base::DictionaryValue& server_dict,
186 SpdySettingsMap* spdy_settings_map);
187 bool AddToAlternateProtocolMap(const HostPortPair& server,
188 const base::DictionaryValue& server_dict,
189 AlternateProtocolMap* alternate_protocol_map);
190 bool AddToSupportsQuicMap(const HostPortPair& server,
191 const base::DictionaryValue& server_dict,
192 SupportsQuicMap* supports_quic_map);
193 bool AddToNetworkStatsMap(const HostPortPair& server,
194 const base::DictionaryValue& server_dict,
195 ServerNetworkStatsMap* network_stats_map);
196
197 void SaveSpdySettingsToServerPrefs(const SettingsMap* spdy_settings_map,
198 base::DictionaryValue* server_pref_dict);
199 void SaveAlternateProtocolToServerPrefs(
200 const AlternateProtocolInfo* port_alternate_protocol,
201 base::DictionaryValue* server_pref_dict);
202 void SaveSupportsQuicToServerPrefs(const SupportsQuic* supports_quic,
203 base::DictionaryValue* server_pref_dict);
204 void SaveNetworkStatsToServerPrefs(
205 const ServerNetworkStats* server_network_stats,
206 base::DictionaryValue* server_pref_dict);
207
184 // ----------- 208 // -----------
185 // Pref thread 209 // Pref thread
186 // ----------- 210 // -----------
187 211
188 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_; 212 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_;
189 213
190 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_; 214 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_;
191 215
192 // Used to post cache update tasks. 216 // Used to post cache update tasks.
193 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > 217 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> >
(...skipping 24 matching lines...) Expand all
218 // Used to get |weak_ptr_| to self on the network thread. 242 // Used to get |weak_ptr_| to self on the network thread.
219 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > 243 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
220 network_weak_ptr_factory_; 244 network_weak_ptr_factory_;
221 245
222 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 246 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
223 }; 247 };
224 248
225 } // namespace net 249 } // namespace net
226 250
227 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 251 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698