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

Unified Diff: chrome/browser/supervised_user/supervised_user_url_filter.cc

Issue 2836333002: Revert of Use TaskScheduler instead of blocking pool in supervised_user_url_filter.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/supervised_user/supervised_user_url_filter.cc
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
index 81cb848ff83bf64761a80213164b4629f8aa9344..66f39bbb50fa59c16d5abe395391046f6eac11ec 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -19,7 +19,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/task_runner_util.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/supervised_user/experimental/supervised_user_blacklist.h"
#include "components/google/core/browser/google_util.h"
#include "components/policy/core/browser/url_blacklist_manager.h"
@@ -195,7 +195,8 @@
return builder.Build();
}
-std::unique_ptr<SupervisedUserURLFilter::Contents> LoadWhitelistsAsyncThread(
+std::unique_ptr<SupervisedUserURLFilter::Contents>
+LoadWhitelistsOnBlockingPoolThread(
const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists) {
FilterBuilder builder;
for (const scoped_refptr<SupervisedUserSiteList>& site_list : site_lists)
@@ -237,12 +238,9 @@
google_amp_viewer_path_regex_(kGoogleAmpViewerPathPattern),
google_web_cache_query_regex_(kGoogleWebCacheQueryPattern),
blocking_task_runner_(
- base::CreateTaskRunnerWithTraits(
- base::TaskTraits()
- .MayBlock()
- .WithPriority(base::TaskPriority::BACKGROUND)
- .WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN))
+ BrowserThread::GetBlockingPool()
+ ->GetTaskRunnerWithShutdownBehavior(
+ base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN)
.get()),
weak_ptr_factory_(this) {
DCHECK(amp_cache_path_regex_.ok());
@@ -483,7 +481,7 @@
base::PostTaskAndReplyWithResult(
blocking_task_runner_.get(), FROM_HERE,
- base::Bind(&LoadWhitelistsAsyncThread, site_lists),
+ base::Bind(&LoadWhitelistsOnBlockingPoolThread, site_lists),
base::Bind(&SupervisedUserURLFilter::SetContents,
weak_ptr_factory_.GetWeakPtr()));
}
« 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