chromium/third_party/blink/renderer/core/frame/dactyloscoper.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/frame/dactyloscoper.h"

#include "base/trace_event/typed_macros.h"
#include "base/tracing/protos/chrome_track_event.pbzero.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/renderer/bindings/core/v8/capture_source_location.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/svg/svg_string_list_tear_off.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/fonts/font_description.h"
#include "third_party/blink/renderer/platform/fonts/font_selection_types.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/perfetto/include/perfetto/tracing/event_context.h"
#include "v8/include/v8-function-callback.h"

namespace blink {

Dactyloscoper::Dactyloscoper() = default;

namespace {

bool ShouldSample(WebFeature feature) {}

CalledJsApi;
JSFunctionArgument;
ArgumentType;
ChromeTrackEvent;
HighEntropyAPI;
ExecutionContextProto;
SourceLocationProto;
FontLookup;
FontLookupType;

ArgumentType GetArgumentType(v8::Local<v8::Value> value) {}

// Returns the stringified object on success and an empty string on failure
String V8ValueToString(v8::Local<v8::Context> current_context,
                       v8::Isolate* isolate,
                       const v8::Local<v8::Value>& value) {}

FontLookupType ToTypeProto(Dactyloscoper::FontLookupType lookup_type) {}

}  // namespace

// static
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
                                        WebFeature feature,
                                        const IdentifiableToken& value) {}

// static
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
                                        WebFeature feature,
                                        const String& str) {}

// static
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
                                        WebFeature feature,
                                        const Vector<String>& strs) {}

// static
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
                                        WebFeature feature,
                                        const DOMArrayBufferView* buffer) {}

// static
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
                                        WebFeature feature,
                                        SVGStringListTearOff* strings) {}

// static
void Dactyloscoper::TraceFontLookup(ExecutionContext* execution_context,
                                    const AtomicString& name,
                                    const FontDescription& font_description,
                                    Dactyloscoper::FontLookupType lookup_type) {}

Dactyloscoper::HighEntropyTracer::HighEntropyTracer(
    const char* called_api_name,
    const v8::FunctionCallbackInfo<v8::Value>& info) {}

Dactyloscoper::HighEntropyTracer::~HighEntropyTracer() {}

}  // namespace blink