chromium/content/services/auction_worklet/for_debugging_only_bindings.cc

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

#include "content/services/auction_worklet/for_debugging_only_bindings.h"

#include <memory>
#include <optional>
#include <string>
#include <utility>

#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/strcat.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_v8_logger.h"
#include "content/services/auction_worklet/webidl_compat.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
#include "url/url_constants.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-template.h"

namespace auction_worklet {

namespace {

// Attempts to parse the first elements of `args` as a URL, and set `url_out` to
// it. Throws an exception on most failures and leaves `url_out` alone.
// `function_name` is used only for exception text and logging.
void ParseAndSetDebugUrl(AuctionV8Helper* v8_helper,
                         AuctionV8Logger* v8_logger,
                         const v8::FunctionCallbackInfo<v8::Value>& args,
                         const char* function_name,
                         std::optional<GURL>& url_out) {}

}  // namespace

ForDebuggingOnlyBindings::ForDebuggingOnlyBindings(AuctionV8Helper* v8_helper,
                                                   AuctionV8Logger* v8_logger)
    :{}

ForDebuggingOnlyBindings::~ForDebuggingOnlyBindings() = default;

void ForDebuggingOnlyBindings::AttachToContext(v8::Local<v8::Context> context) {}

void ForDebuggingOnlyBindings::Reset() {}

std::optional<GURL> ForDebuggingOnlyBindings::TakeLossReportUrl() {}

std::optional<GURL> ForDebuggingOnlyBindings::TakeWinReportUrl() {}

void ForDebuggingOnlyBindings::ReportAdAuctionLoss(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void ForDebuggingOnlyBindings::ReportAdAuctionWin(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

}  // namespace auction_worklet