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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 2567893002: Pass pref_task_runner through HttpServerPropertiesManager's cxtor so that tests could inject a Test… (Closed)
Patch Set: add comments to HttpServerPropertiesManager Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_manager.cc
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index 0c4d2fe274499cb5020907b4e3cbe6742def1c90..9653e9269ba1d72827d8ecd4c1191ae66a1f7cfd 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -73,8 +73,9 @@ HttpServerPropertiesManager::PrefDelegate::~PrefDelegate() {}
HttpServerPropertiesManager::HttpServerPropertiesManager(
PrefDelegate* pref_delegate,
+ scoped_refptr<base::SingleThreadTaskRunner> pref_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner)
- : pref_task_runner_(base::ThreadTaskRunnerHandle::Get()),
+ : pref_task_runner_(pref_task_runner),
pref_delegate_(pref_delegate),
setting_prefs_(false),
network_task_runner_(network_task_runner) {
@@ -83,6 +84,7 @@ HttpServerPropertiesManager::HttpServerPropertiesManager(
new base::WeakPtrFactory<HttpServerPropertiesManager>(this));
pref_weak_ptr_ = pref_weak_ptr_factory_->GetWeakPtr();
pref_cache_update_timer_.reset(new base::OneShotTimer);
+ pref_cache_update_timer_->SetTaskRunner(pref_task_runner_);
pref_delegate_->StartListeningForUpdates(
base::Bind(&HttpServerPropertiesManager::OnHttpServerPropertiesChanged,
base::Unretained(this)));
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698