chromium/chrome/browser/policy/messaging_layer/util/test_request_payload.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.

// Test support library for request payloads.

#include "chrome/browser/policy/messaging_layer/util/test_request_payload.h"

#include <string>
#include <string_view>

#include "base/json/json_reader.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "chrome/browser/policy/messaging_layer/upload/encrypted_reporting_client.h"
#include "chrome/browser/policy/messaging_layer/upload/record_upload_request_builder.h"
#include "components/reporting/util/encrypted_reporting_json_keys.h"
#include "third_party/abseil-cpp/absl/strings/ascii.h"

namespace reporting {

// Return true if s a properly formatted positive integer, i.e., is not empty,
// contains digits only and does not start with 0.
static bool IsPositiveInteger(std::string_view s) {}

// Get the record list. If it can't, print the message to listener and return a
// null pointer.
static const base::Value::List* GetRecordList(const base::Value::Dict& arg,
                                              MatchResultListener* listener) {}

bool AttachEncryptionSettingsMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void AttachEncryptionSettingsMatcher::DescribeTo(std::ostream* os) const {}

void AttachEncryptionSettingsMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string AttachEncryptionSettingsMatcher::Name() const {}

bool NoAttachEncryptionSettingsMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void NoAttachEncryptionSettingsMatcher::DescribeTo(std::ostream* os) const {}

void NoAttachEncryptionSettingsMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string NoAttachEncryptionSettingsMatcher::Name() const {}

bool ConfigurationFileVersionMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void ConfigurationFileVersionMatcher::DescribeTo(std::ostream* os) const {}

void ConfigurationFileVersionMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string ConfigurationFileVersionMatcher::Name() const {}

bool NoConfigurationFileVersionMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void NoConfigurationFileVersionMatcher::DescribeTo(std::ostream* os) const {}

void NoConfigurationFileVersionMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string NoConfigurationFileVersionMatcher::Name() const {}

bool SourceMatcher::MatchAndExplain(const base::Value::Dict& arg,
                                    MatchResultListener* listener) const {}

void SourceMatcher::DescribeTo(std::ostream* os) const {}

void SourceMatcher::DescribeNegationTo(std::ostream* os) const {}

std::string SourceMatcher::Name() const {}

bool NoSourceMatcher::MatchAndExplain(const base::Value::Dict& arg,
                                      MatchResultListener* listener) const {}

void NoSourceMatcher::DescribeTo(std::ostream* os) const {}

void NoSourceMatcher::DescribeNegationTo(std::ostream* os) const {}

std::string NoSourceMatcher::Name() const {}

void CompressionInformationMatcher::DescribeTo(std::ostream* os) const {}

void CompressionInformationMatcher::DescribeNegationTo(std::ostream* os) const {}

std::string CompressionInformationMatcher::Name() const {}

bool EncryptedRecordMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void EncryptedRecordMatcher::DescribeTo(std::ostream* os) const {}

void EncryptedRecordMatcher::DescribeNegationTo(std::ostream* os) const {}

std::string EncryptedRecordMatcher::Name() const {}

bool RequestIdMatcher::MatchAndExplain(const base::Value::Dict& arg,
                                       MatchResultListener* listener) const {}

void RequestIdMatcher::DescribeTo(std::ostream* os) const {}

void RequestIdMatcher::DescribeNegationTo(std::ostream* os) const {}

std::string RequestIdMatcher::Name() const {}

bool RecordMatcher::MatchAndExplain(const base::Value::Dict& arg,
                                    MatchResultListener* listener) const {}

RecordMatcher& RecordMatcher::SetMode(RecordMatcher::Mode mode) {}

bool CompressionInformationMatcher::MatchAndExplainRecord(
    const base::Value::Dict& record,
    MatchResultListener* listener) const {}

bool EncryptedWrappedRecordRecordMatcher::MatchAndExplainRecord(
    const base::Value::Dict& record,
    MatchResultListener* listener) const {}

void EncryptedWrappedRecordRecordMatcher::DescribeTo(std::ostream* os) const {}

void EncryptedWrappedRecordRecordMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string EncryptedWrappedRecordRecordMatcher::Name() const {}

bool NoEncryptedWrappedRecordRecordMatcher::MatchAndExplainRecord(
    const base::Value::Dict& record,
    MatchResultListener* listener) const {}

void NoEncryptedWrappedRecordRecordMatcher::DescribeTo(std::ostream* os) const {}

void NoEncryptedWrappedRecordRecordMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string NoEncryptedWrappedRecordRecordMatcher::Name() const {}

bool SequenceInformationRecordMatcher::MatchAndExplainRecord(
    const base::Value::Dict& record,
    MatchResultListener* listener) const {}

void SequenceInformationRecordMatcher::DescribeTo(std::ostream* os) const {}

void SequenceInformationRecordMatcher::DescribeNegationTo(
    std::ostream* os) const {}

std::string SequenceInformationRecordMatcher::Name() const {}

bool RequestContainingRecordMatcher::IsSubDict(const base::Value::Dict& sub,
                                               const base::Value::Dict& super) {}

RequestContainingRecordMatcher::RequestContainingRecordMatcher(
    std::string_view matched_record_json)
    :{}

bool RequestContainingRecordMatcher::MatchAndExplain(
    const base::Value::Dict& arg,
    MatchResultListener* listener) const {}

void RequestContainingRecordMatcher::DescribeTo(std::ostream* os) const {}

void RequestContainingRecordMatcher::DescribeNegationTo(
    std::ostream* os) const {}

}  // namespace reporting