chromium/content/services/auction_worklet/report_bindings.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_SERVICES_AUCTION_WORKLET_REPORT_BINDINGS_H_
#define CONTENT_SERVICES_AUCTION_WORKLET_REPORT_BINDINGS_H_

#include <optional>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/context_recycler.h"
#include "url/gurl.h"
#include "v8/include/v8-forward.h"

namespace auction_worklet {

class AuctionV8Logger;

// Class to manage bindings for setting a report URL. Expected to be used for a
// context managed by ContextRecycler. Allows only a single call for a report
// URL. On any subsequent calls, clears the report URL and throws an exception.
// Also throws on invalid URLs or non-HTTPS URLs.
class ReportBindings : public Bindings {};

}  // namespace auction_worklet

#endif  // CONTENT_SERVICES_AUCTION_WORKLET_REPORT_BINDINGS_H_