/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SRC_TRACE_REDACTION_REDACT_TASK_NEWTASK_H_
#define SRC_TRACE_REDACTION_REDACT_TASK_NEWTASK_H_

#include "src/trace_redaction/redact_ftrace_event.h"
#include "src/trace_redaction/redact_sched_events.h"
#include "src/trace_redaction/trace_redaction_framework.h"

namespace perfetto::trace_redaction {

// Goes through ftrace events and conditonally removes the comm values from
// task_newtask events.
class RedactTaskNewTask : public FtraceEventRedaction {
 public:
  static constexpr auto kFieldId =
      protos::pbzero::FtraceEvent::kTaskNewtaskFieldNumber;

  base::Status Redact(
      const Context& context,
      const protos::pbzero::FtraceEventBundle::Decoder& bundle,
      protozero::ProtoDecoder& event,
      protos::pbzero::FtraceEvent* event_message) const override;

  template <class Modifier>
  void emplace_back() {
    modifier_ = std::make_unique<Modifier>();
  }

 public:
  std::unique_ptr<SchedEventModifier> modifier_;
};

}  // namespace perfetto::trace_redaction

#endif  // SRC_TRACE_REDACTION_REDACT_TASK_NEWTASK_H_
