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

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

Issue 2841593003: Use TaskScheduler instead of blocking pool in profile_impl_io_data.cc. (Closed)
Patch Set: Created 3 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 | 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 f2526a019dcc12b0fea965cf50af45a05e50404e..c4fe90c0986e7023897ced4209a3ec270d5ec8b5 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -18,6 +18,7 @@
#include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
@@ -502,8 +503,9 @@ void ProfileImplIOData::InitializeInternal(
scoped_refptr<QuotaPolicyChannelIDStore> channel_id_db =
new QuotaPolicyChannelIDStore(
lazy_params_->channel_id_path,
- BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
- base::SequencedWorkerPool::GetSequenceToken()),
+ base::CreateSequencedTaskRunnerWithTraits(
+ base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND)),
gab 2017/08/15 00:02:44 This call also lands in net::SQLiteChannelIDStore'
lazy_params_->special_storage_policy.get());
main_context_storage->set_channel_id_service(
base::MakeUnique<net::ChannelIDService>(
@@ -647,9 +649,9 @@ net::URLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
cookie_config.crypto_delegate = cookie_config::GetCookieCryptoDelegate();
cookie_store = content::CreateCookieStore(cookie_config);
channel_id_db = new net::SQLiteChannelIDStore(
- channel_id_path,
- BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
- base::SequencedWorkerPool::GetSequenceToken()));
+ channel_id_path, base::CreateSequencedTaskRunnerWithTraits(
+ base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND)));
gab 2017/08/15 00:02:44 I don't think TaskPriority::BACKGROUND is correct
}
std::unique_ptr<net::ChannelIDService> channel_id_service(
new net::ChannelIDService(
« 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