Index: chrome/service/service_process.cc |
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc |
index f820f938d6401a95a76f0692788265fd65ed5c82..c73cdd5a861fe13ed6f234a671f7cb897315cdc7 100644 |
--- a/chrome/service/service_process.cc |
+++ b/chrome/service/service_process.cc |
@@ -152,6 +152,7 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop, |
Teardown(); |
return false; |
} |
+ blocking_pool_ = new base::SequencedWorkerPool(3, "ServiceBlocking"); |
request_context_getter_ = new ServiceURLRequestContextGetter(); |
@@ -159,7 +160,7 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop, |
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
FilePath pref_path = user_data_dir.Append(chrome::kServiceStateFileName); |
service_prefs_.reset( |
- new ServiceProcessPrefs(pref_path, file_thread_->message_loop_proxy())); |
+ new ServiceProcessPrefs(pref_path, blocking_pool_)); |
service_prefs_->ReadPrefs(); |
// Check if a locale override has been specified on the command-line. |
@@ -218,6 +219,12 @@ bool ServiceProcess::Teardown() { |
shutdown_event_.Signal(); |
io_thread_.reset(); |
file_thread_.reset(); |
+ |
+ if (blocking_pool_.get()) { |
+ blocking_pool_->Shutdown(); |
+ blocking_pool_ = NULL; |
+ } |
+ |
// The NetworkChangeNotifier must be destroyed after all other threads that |
// might use it have been shut down. |
network_change_notifier_.reset(); |