| 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 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 private: | 217 private: |
| 218 void OnHttpServerPropertiesChanged(); | 218 void OnHttpServerPropertiesChanged(); |
| 219 | 219 |
| 220 // ----------- | 220 // ----------- |
| 221 // Pref thread | 221 // Pref thread |
| 222 // ----------- | 222 // ----------- |
| 223 | 223 |
| 224 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_; | 224 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_; |
| 225 | 225 |
| 226 // Used to get |weak_ptr_| to self on the pref thread. | |
| 227 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > | |
| 228 pref_weak_ptr_factory_; | |
| 229 | |
| 230 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_; | 226 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_; |
| 231 | 227 |
| 232 // Used to post cache update tasks. | 228 // Used to post cache update tasks. |
| 233 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > | 229 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > |
| 234 pref_cache_update_timer_; | 230 pref_cache_update_timer_; |
| 235 | 231 |
| 236 // Used to track the spdy servers changes. | 232 // Used to track the spdy servers changes. |
| 237 PrefChangeRegistrar pref_change_registrar_; | 233 PrefChangeRegistrar pref_change_registrar_; |
| 238 PrefService* pref_service_; // Weak. | 234 PrefService* pref_service_; // Weak. |
| 239 bool setting_prefs_; | 235 bool setting_prefs_; |
| 240 const char* path_; | 236 const char* path_; |
| 241 | 237 |
| 242 // -------------- | 238 // -------------- |
| 243 // Network thread | 239 // Network thread |
| 244 // -------------- | 240 // -------------- |
| 245 | 241 |
| 246 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_; | 242 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_; |
| 247 | 243 |
| 248 // Used to get |weak_ptr_| to self on the network thread. | |
| 249 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > | |
| 250 network_weak_ptr_factory_; | |
| 251 | |
| 252 // Used to post |prefs::kHttpServerProperties| pref update tasks. | 244 // Used to post |prefs::kHttpServerProperties| pref update tasks. |
| 253 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > | 245 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > |
| 254 network_prefs_update_timer_; | 246 network_prefs_update_timer_; |
| 255 | 247 |
| 256 scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_; | 248 scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_; |
| 257 | 249 |
| 250 // Used to get |weak_ptr_| to self on the pref thread. |
| 251 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > |
| 252 pref_weak_ptr_factory_; |
| 253 |
| 254 // Used to get |weak_ptr_| to self on the network thread. |
| 255 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > |
| 256 network_weak_ptr_factory_; |
| 257 |
| 258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 } // namespace net | 261 } // namespace net |
| 262 | 262 |
| 263 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 263 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |