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

Unified Diff: chrome/browser/prefs/pref_service.cc

Issue 10344007: Use worker pool for IO in JsonPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/common/important_file_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index ea1d705eac19c365f2940c65f9b3eead5ea9b2f9..7abae21c5556a7fbfc1d0c3a99e2df52873a6e33 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -17,6 +17,7 @@
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/value_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
@@ -145,9 +146,10 @@ PrefService* PrefService::CreatePrefService(const FilePath& pref_filename,
CommandLinePrefStore* command_line =
new CommandLinePrefStore(CommandLine::ForCurrentProcess());
- JsonPrefStore* user = new JsonPrefStore(
- pref_filename,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ scoped_refptr<base::SequencedTaskRunner> io_task_runner =
+ BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
+ BrowserThread::GetBlockingPool()->GetSequenceToken());
+ JsonPrefStore* user = new JsonPrefStore(pref_filename, io_task_runner);
DefaultPrefStore* default_pref_store = new DefaultPrefStore();
PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
« no previous file with comments | « no previous file | chrome/common/important_file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698