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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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 | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/service/service_process_prefs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 2413102463dc80a2db21005401ef0449dd4b2ec2..080cb2a9d43e14fd102261ef456fffb6f7af185c 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -16,6 +16,7 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/automation/automation_provider_list.h"
@@ -707,11 +708,18 @@ void BrowserProcessImpl::CreateLocalState() {
DCHECK(!created_local_state_ && local_state_.get() == NULL);
created_local_state_ = true;
+ scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner =
akalin 2012/10/17 21:58:19 is there any way we can pass down the task runner
zel 2012/10/18 00:31:15 Done.
+ BrowserThread::GetBlockingPool()->
+ GetSequencedTaskRunnerWithShutdownBehavior(
+ BrowserThread::GetBlockingPool()->GetNamedSequenceToken(
+ "local_state_pool"),
+ base::SequencedWorkerPool::BLOCK_SHUTDOWN);
+
FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
local_state_.reset(
PrefService::CreatePrefService(local_state_path, policy_service(), NULL,
- false));
+ false, sequenced_task_runner.get()));
// Initialize the prefs of the local state.
chrome::RegisterLocalState(local_state_.get());
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/service/service_process_prefs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698