[cr149] ActorTask::AddTab asks on-dettach behaviour for tab

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c93c5d88e4f60a6586e10ff1ce4a8feeaf3f4248

commit c93c5d88e4f60a6586e10ff1ce4a8feeaf3f4248
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Wed Apr 15 12:37:06 2026 -0700

    Add LoadAndExtractContent's tabs to ActorTask's tab set

    This ensures that LoadAndExtractContent does not bypass the enterprise
    policy blocklist, sensitive site list, or static navigation blocklist.

    This CL also adds the ability to add a tab to the controlled tabs set
    without stopping the ActorTask when that tab is detached/closed. This is
    needed for the ephemeral tabs created by the LoadAndExtractContent tool.

    Fixed: 497342466
    Change-Id: I355e2bc4ab9a27d52281de10ce6bdc98b50cc43a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727485
    Reviewed-by: Jeremy Roman <jbroman@chromium.org>
    Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615339}
This commit is contained in:
Claudio DeSouza
2026-05-22 16:24:57 -04:00
committed by Max Karolinskiy
parent efd6458b00
commit cb4ca01cfc
@@ -187,7 +187,7 @@ void ContentAgentToolProvider::GetOrCreateTabHandleForTask(
return;
}
task->AddTab(
task_tab_handle_,
task_tab_handle_, /*stop_task_on_detach=*/true,
base::BindOnce(&ContentAgentToolProvider::TabAddedToTask,
weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
task->Resume();