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

Unified Diff: chrome/browser/conflicts/module_inspector_win.cc

Issue 2873463002: Remove call to base::TaskTraits::WithPriority() in module_inspector_win.cc. (Closed)
Patch Set: CR-pmonette-5 Created 3 years, 7 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 | « chrome/browser/conflicts/module_inspector_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/conflicts/module_inspector_win.cc
diff --git a/chrome/browser/conflicts/module_inspector_win.cc b/chrome/browser/conflicts/module_inspector_win.cc
index ae00cd2d9c7959aec8569259d2b918b0aa5b0d9a..e706b06ea2ab9c14a318544e469051a463ede8b6 100644
--- a/chrome/browser/conflicts/module_inspector_win.cc
+++ b/chrome/browser/conflicts/module_inspector_win.cc
@@ -23,9 +23,7 @@ StringMapping GetPathMapping() {
ModuleInspector::ModuleInspector(
const OnModuleInspectedCallback& on_module_inspected_callback)
: on_module_inspected_callback_(on_module_inspected_callback),
- inspection_task_traits_(
- {base::MayBlock(), base::TaskPriority::BACKGROUND,
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}),
+ inspection_task_priority_(base::TaskPriority::BACKGROUND),
path_mapping_(GetPathMapping()),
weak_ptr_factory_(this) {}
@@ -40,9 +38,8 @@ void ModuleInspector::AddModule(const ModuleInfoKey& module_key) {
void ModuleInspector::IncreaseInspectionPriority() {
DCHECK(thread_checker_.CalledOnValidThread());
- // Modify the task traits so that future inspections are done faster.
- inspection_task_traits_ =
- inspection_task_traits_.WithPriority(base::TaskPriority::USER_VISIBLE);
+ // Modify the TaskPriority so that future inspections are done faster.
+ inspection_task_priority_ = base::TaskPriority::USER_VISIBLE;
}
void ModuleInspector::StartInspectingModule() {
@@ -50,10 +47,12 @@ void ModuleInspector::StartInspectingModule() {
queue_.pop();
base::PostTaskWithTraitsAndReplyWithResult(
- FROM_HERE, inspection_task_traits_,
- base::Bind(&InspectModule, path_mapping_, module_key),
- base::Bind(&ModuleInspector::OnInspectionFinished,
- weak_ptr_factory_.GetWeakPtr(), module_key));
+ FROM_HERE,
+ {base::MayBlock(), inspection_task_priority_,
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
+ base::BindOnce(&InspectModule, path_mapping_, module_key),
+ base::BindOnce(&ModuleInspector::OnInspectionFinished,
+ weak_ptr_factory_.GetWeakPtr(), module_key));
}
void ModuleInspector::OnInspectionFinished(
« no previous file with comments | « chrome/browser/conflicts/module_inspector_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698