Unreviewed changes
8 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/actor/actor_keyed_service.cc
Insertions: 5, Deletions: 7.
@@ -250,13 +250,13 @@
std::vector<std::unique_ptr<ToolRequest>>&& actions,
PerformActionsCallback callback) {
TRACE_EVENT0("actor", "ActorKeyedService::PerformActions");
- const std::vector<optimization_guide::proto::ScriptToolResult> empty_results;
+ std::vector<ActionResultWithLatencyInfo> empty_results;
auto* task = GetTask(task_id);
if (!task) {
VLOG(1) << "PerformActions failed: Task not found.";
RunLater(base::BindOnce(std::move(callback),
mojom::ActionResultCode::kTaskWentAway,
- std::nullopt, empty_results));
+ std::nullopt, std::move(empty_results)));
return;
}
@@ -264,7 +264,7 @@
VLOG(1) << "PerformActions failed: No actions provided.";
RunLater(base::BindOnce(std::move(callback),
mojom::ActionResultCode::kEmptyActionSequence,
- std::nullopt, empty_results));
+ std::nullopt, std::move(empty_results)));
return;
}
@@ -278,14 +278,12 @@
PerformActionsCallback callback,
mojom::ActionResultPtr result,
std::optional<size_t> index_of_failed_action,
- std::vector<optimization_guide::proto::ScriptToolResult>
- script_tool_results) {
+ std::vector<ActionResultWithLatencyInfo> action_results) {
TRACE_EVENT0("actor", "ActorKeyedService::OnActionsFinished");
// If the result if Ok then we must not have a failed action.
CHECK(!IsOk(*result) || !index_of_failed_action);
RunLater(base::BindOnce(std::move(callback), result->code,
- index_of_failed_action,
- std::move(script_tool_results)));
+ index_of_failed_action, std::move(action_results)));
}
void ActorKeyedService::StopTask(TaskId task_id, bool success) {
```
Change information
Commit message:
Add tracing to the "actor" browser component
This change introduces a new trace category "actor" and adds `TRACE_EVENT` calls to key methods within `ActorKeyedService`, `ExecutionEngine`, and `browser_action_util` to provide insights into the execution flow of actor-related operations.
Bug: 442852243
Change-Id: I25338a5a0982d4aeae5f657aff50c3282808742c
Cr-Commit-Position: refs/heads/main@{#1511081}
Files:
- M base/trace_event/builtin_categories.h
- M chrome/browser/actor/actor_keyed_service.cc
- M chrome/browser/actor/browser_action_util.cc
- M chrome/browser/actor/execution_engine.cc
Change size: S
Delta: 4 files changed, 41 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Eric Seckler, +1 by David Bokan