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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 12321143: Move cookie DB to the blocking pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ALL the cookie DBs to the blocking pool. Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 0535f1072eb7bae85e96b15f83caa5f16adab4a6..5a4982299ab508af1b292797891111a79252c8db 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -10,7 +10,9 @@
#include "base/logging.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/public/pref_member.h"
+#include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
@@ -389,7 +391,8 @@ void ProfileImplIOData::InitializeInternal(
new SQLitePersistentCookieStore(
lazy_params_->cookie_path,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
+ BrowserThread::GetBlockingPool()->GetSequenceToken()),
lazy_params_->restore_old_session_cookies,
new ClearOnExitPolicy(lazy_params_->special_storage_policy));
cookie_store =
@@ -499,7 +502,8 @@ void ProfileImplIOData::
new SQLitePersistentCookieStore(
lazy_params_->extensions_cookie_path,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
+ BrowserThread::GetBlockingPool()->GetSequenceToken()),
lazy_params_->restore_old_session_cookies, NULL), NULL);
// Enable cookies for devtools and extension URLs.
const char* schemes[] = {chrome::kChromeDevToolsScheme,
@@ -599,7 +603,8 @@ ProfileImplIOData::InitializeAppRequestContext(
new SQLitePersistentCookieStore(
cookie_path,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
+ BrowserThread::GetBlockingPool()->GetSequenceToken()),
false,
NULL);
// TODO(creis): We should have a cookie delegate for notifying the cookie
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698