| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO | 61 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO |
| 62 // thread. It also posts a task to UI thread to get SPDY Server preferences | 62 // thread. It also posts a task to UI thread to get SPDY Server preferences |
| 63 // from |pref_service_|. | 63 // from |pref_service_|. |
| 64 void InitializeOnIOThread(); | 64 void InitializeOnIOThread(); |
| 65 | 65 |
| 66 // Prepare for shutdown. Must be called on the UI thread, before destruction. | 66 // Prepare for shutdown. Must be called on the UI thread, before destruction. |
| 67 void ShutdownOnUIThread(); | 67 void ShutdownOnUIThread(); |
| 68 | 68 |
| 69 // Register |prefs| for properties managed here. | 69 // Register |prefs| for properties managed here. |
| 70 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 70 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 71 | 71 |
| 72 // Helper function for unit tests to set the version in the dictionary. | 72 // Helper function for unit tests to set the version in the dictionary. |
| 73 static void SetVersion(base::DictionaryValue* http_server_properties_dict, | 73 static void SetVersion(base::DictionaryValue* http_server_properties_dict, |
| 74 int version_number); | 74 int version_number); |
| 75 | 75 |
| 76 // Deletes all data. Works asynchronously, but if a |completion| callback is | 76 // Deletes all data. Works asynchronously, but if a |completion| callback is |
| 77 // provided, it will be fired on the UI thread when everything is done. | 77 // provided, it will be fired on the UI thread when everything is done. |
| 78 void Clear(const base::Closure& completion); | 78 void Clear(const base::Closure& completion); |
| 79 | 79 |
| 80 // ---------------------------------- | 80 // ---------------------------------- |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 io_prefs_update_timer_; | 234 io_prefs_update_timer_; |
| 235 | 235 |
| 236 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; | 236 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; |
| 237 | 237 |
| 238 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 238 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 } // namespace chrome_browser_net | 241 } // namespace chrome_browser_net |
| 242 | 242 |
| 243 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 243 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |