Commit a9d38540 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[base] Make PostTaskAndReply destination explicit in /extensions/browser/api/crash_report_private

Task APIs v3 will all have an explicit destination. In the past
"default traits" meant ThreadPool. This CL is thus a no-op.

These changes are required to phase out task APIs v2 (post_task.h)
Design doc: https://docs.google.com/document/d/1tssusPykvx3g0gvbvU4HxGyn3MjJlIylnsH13-Tv6s4/edit

This CL was uploaded by git cl split.

R=ortuno@chromium.org

Bug: 1026641, 968047
Change-Id: I6971ac85ba55e6960fa74e6dbb078a1a30467e27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219033
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773580}
parent be1a3f4e
......@@ -7,7 +7,6 @@
#include "base/strings/strcat.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/time/default_clock.h"
......@@ -216,8 +215,8 @@ ExtensionFunction::ResponseAction CrashReportPrivateReportErrorFunction::Run() {
// Consent checking may be blocking, so do it on a separate thread to avoid
// blocking the UI thread.
PostTaskAndReplyWithResult(
FROM_HERE, {base::ThreadPool(), base::MayBlock()},
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock()},
base::BindOnce(&crash_reporter::GetClientCollectStatsConsent),
base::BindOnce(
&CrashReportPrivateReportErrorFunction::OnConsentCheckCompleted, this,
......@@ -240,7 +239,7 @@ void CrashReportPrivateReportErrorFunction::OnConsentCheckCompleted(
->GetURLLoaderFactoryForBrowserProcess();
// Don't anonymize the report on the UI thread as it can take some time.
PostTaskAndReplyWithResult(
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, base::BindOnce(&AnonymizeErrorMessage, info.message),
base::BindOnce(
&ReportJavaScriptError, std::move(loader_factory), std::move(info),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment