| Index: chrome/browser/net/http_server_properties_manager.h
|
| diff --git a/chrome/browser/net/http_server_properties_manager.h b/chrome/browser/net/http_server_properties_manager.h
|
| index dc6a3a8ab18b74010c0585d53729e6ffc0d6cf23..07e34ba7080513b26a0e57699999df4a8d495a8f 100644
|
| --- a/chrome/browser/net/http_server_properties_manager.h
|
| +++ b/chrome/browser/net/http_server_properties_manager.h
|
| @@ -67,11 +67,15 @@ class HttpServerPropertiesManager
|
| // Register |prefs| for properties managed here.
|
| static void RegisterPrefs(PrefService* prefs);
|
|
|
| + // Deletes all data. Works asynchronously, but if a |completion| callback is
|
| + // provided, it will be fired on the UI thread when everything is done.
|
| + void Clear(const base::Closure& completion);
|
| +
|
| // ----------------------------------
|
| // net::HttpServerProperties methods:
|
| // ----------------------------------
|
|
|
| - // Deletes all data.
|
| + // Deletes all data. Works asynchronously.
|
| virtual void Clear() OVERRIDE;
|
|
|
| // Returns true if |server| supports SPDY. Should only be called from IO
|
| @@ -174,16 +178,20 @@ class HttpServerPropertiesManager
|
| // Update prefs::kHttpServerProperties in preferences with the cached data
|
| // from |http_server_properties_impl_|. This gets the data on IO thread and
|
| // posts a task (UpdatePrefsOnUI) to update the preferences UI thread.
|
| - // Virtual for testing.
|
| - virtual void UpdatePrefsFromCacheOnIO();
|
| + void UpdatePrefsFromCacheOnIO();
|
| +
|
| + // Same as above, but fires an optional |completion| callback on the UI thread
|
| + // when finished. Virtual for testing.
|
| + virtual void UpdatePrefsFromCacheOnIO(const base::Closure& completion);
|
|
|
| - // Update prefs::kHttpServerProperties preferences on UI thread. Protected for
|
| - // testing.
|
| + // Update prefs::kHttpServerProperties preferences on UI thread. Executes an
|
| + // optional |completion| callback when finished. Protected for testing.
|
| void UpdatePrefsOnUI(
|
| base::ListValue* spdy_server_list,
|
| net::SpdySettingsMap* spdy_settings_map,
|
| net::AlternateProtocolMap* alternate_protocol_map,
|
| - net::PipelineCapabilityMap* pipeline_capability_map);
|
| + net::PipelineCapabilityMap* pipeline_capability_map,
|
| + const base::Closure& completion);
|
|
|
| private:
|
| // Callback for preference changes.
|
|
|