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

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: 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
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..59b990015e47eb9413b15c4b17570a413a7851a9 100644
--- a/chrome/browser/conflicts/module_inspector_win.cc
+++ b/chrome/browser/conflicts/module_inspector_win.cc
@@ -23,9 +23,6 @@ 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}),
path_mapping_(GetPathMapping()),
weak_ptr_factory_(this) {}
@@ -40,9 +37,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 +46,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(

Powered by Google App Engine
This is Rietveld 408576698