blob: 93e8784d1c757ae5115c1ecd557ff5c27daa1c2c [file] [log] [blame]
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/actor/tools/tool.h"
#include "chrome/browser/actor/aggregated_journal.h"
#include "chrome/common/actor/action_result.h"
namespace actor {
Tool::Tool(TaskId task_id, ToolDelegate& tool_delegate)
: task_id_(task_id), tool_delegate_(tool_delegate) {}
Tool::~Tool() = default;
mojom::ActionResultPtr Tool::TimeOfUseValidation(
const optimization_guide::proto::AnnotatedPageContent* last_observation) {
return MakeOkResult();
}
GURL Tool::JournalURL() const {
return GURL::EmptyGURL();
}
void Tool::UpdateTaskBeforeInvoke(ActorTask& task,
InvokeCallback callback) const {
// Do nothing by default, just trigger the callback.
std::move(callback).Run(MakeOkResult());
}
void Tool::UpdateTaskAfterInvoke(ActorTask& task,
mojom::ActionResultPtr result,
InvokeCallback callback) const {
// Do nothing by default, just trigger the callback.
std::move(callback).Run(std::move(result));
}
} // namespace actor