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

Unified Diff: chrome/browser/chrome_browser_main.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
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 309041ee9d42ee2629b730926910227b5fc03633..67ce788d5401e08f9a1d21b7fcbed996441f6f79 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -25,6 +25,7 @@
#include "base/string_split.h"
#include "base/sys_string_conversions.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
@@ -310,6 +311,13 @@ PrefService* InitializeLocalState(const CommandLine& parsed_command_line,
#endif // defined(OS_WIN)
}
+ scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner =
+ BrowserThread::GetBlockingPool()->
+ GetSequencedTaskRunnerWithShutdownBehavior(
+ BrowserThread::GetBlockingPool()->GetNamedSequenceToken(
+ "local_state_pool"),
+ base::SequencedWorkerPool::BLOCK_SHUTDOWN);
+
// If the local state file for the current profile doesn't exist and the
// parent profile command line flag is present, then we should inherit some
// local state from the parent profile.
@@ -325,7 +333,7 @@ PrefService* InitializeLocalState(const CommandLine& parsed_command_line,
scoped_ptr<PrefService> parent_local_state(
PrefService::CreatePrefService(parent_profile,
g_browser_process->policy_service(),
- NULL, false));
+ NULL, false, sequenced_task_runner));
parent_local_state->RegisterStringPref(prefs::kApplicationLocale,
std::string());
// Right now, we only inherit the locale setting from the parent profile.

Powered by Google App Engine
This is Rietveld 408576698