| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |