chromium/components/browsing_data/content/browsing_data_model_test_util.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 "components/browsing_data/content/browsing_data_model_test_util.h"

#include "components/browsing_data/content/browsing_data_model.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace browsing_data_model_test_util {

namespace {

struct DataKeyDebugStringVisitor {};

template <>
std::string DataKeyDebugStringVisitor::operator()<url::Origin>(
    const url::Origin& origin) {}

template <>
std::string DataKeyDebugStringVisitor::operator()<blink::StorageKey>(
    const blink::StorageKey& storage_key) {}

template <>
std::string DataKeyDebugStringVisitor::operator()<
    content::InterestGroupManager::InterestGroupDataKey>(
    const content::InterestGroupManager::InterestGroupDataKey&
        interest_group_data_key) {}

template <>
std::string
DataKeyDebugStringVisitor::operator()<content::AttributionDataModel::DataKey>(
    const content::AttributionDataModel::DataKey& attribution_data_key) {}

template <>
std::string DataKeyDebugStringVisitor::operator()<
    content::PrivateAggregationDataModel::DataKey>(
    const content::PrivateAggregationDataModel::DataKey&
        private_aggregation_data_key) {}

template <>
std::string
DataKeyDebugStringVisitor::operator()<net::SharedDictionaryIsolationKey>(
    const net::SharedDictionaryIsolationKey& shared_dictionary_isolation_key) {}

template <>
std::string
DataKeyDebugStringVisitor::operator()<browsing_data::SharedWorkerInfo>(
    const browsing_data::SharedWorkerInfo& shared_worker_info) {}

template <>
std::string
DataKeyDebugStringVisitor::operator()<content::SessionStorageUsageInfo>(
    const content::SessionStorageUsageInfo& session_storage_usage_info) {}

template <>
std::string DataKeyDebugStringVisitor::operator()<net::CanonicalCookie>(
    const net::CanonicalCookie& cookie) {}

template <>
std::string DataKeyDebugStringVisitor::operator()<
    webid::FederatedIdentityDataModel::DataKey>(
    const webid::FederatedIdentityDataModel::DataKey&
        federated_identity_data_key) {}

struct DataOwnerDebugStringVisitor {};

template <>
std::string DataOwnerDebugStringVisitor::operator()<std::string>(
    const std::string& host) {}

template <>
std::string DataOwnerDebugStringVisitor::operator()<url::Origin>(
    const url::Origin& origin) {}

}  // namespace

BrowsingDataEntry::BrowsingDataEntry(
    const BrowsingDataModel::DataOwner& data_owner,
    BrowsingDataModel::DataKey data_key,
    BrowsingDataModel::DataDetails data_details)
    :{}

BrowsingDataEntry::BrowsingDataEntry(
    const BrowsingDataModel::BrowsingDataEntryView& view)
    :{}

BrowsingDataEntry::~BrowsingDataEntry() = default;
BrowsingDataEntry::BrowsingDataEntry(const BrowsingDataEntry& other) = default;

bool BrowsingDataEntry::operator==(const BrowsingDataEntry& other) const {}

std::string BrowsingDataEntry::ToDebugString() const {}

void ValidateBrowsingDataEntries(
    BrowsingDataModel* model,
    const std::vector<BrowsingDataEntry>& expected_entries) {}

void ValidateBrowsingDataEntriesNonZeroUsage(
    BrowsingDataModel* model,
    const std::vector<BrowsingDataEntry>& expected_entries) {}
}  // namespace browsing_data_model_test_util