chromium/components/subresource_filter/core/browser/ruleset_version.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.

#include "components/subresource_filter/core/browser/ruleset_version.h"

#include <string>
#include <string_view>

#include "base/feature_list.h"
#include "base/strings/strcat.h"
#include "base/trace_event/traced_value.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/subresource_filter/core/common/common_features.h"
#include "components/subresource_filter/core/common/indexed_ruleset.h"

namespace subresource_filter {

namespace {

// Suffixes of names of the preferences storing the most recent ruleset versions
// that were successfully stored to disk.
const char kRulesetContentVersionSuffix[] =;
const char kRulesetFormatVersionSuffix[] =;
const char kRulesetChecksumSuffix[] =;

std::string ContentVersionPrefName(std::string_view filter_tag) {}

std::string FormatVersionPrefName(std::string_view filter_tag) {}

std::string ChecksumPrefName(std::string_view filter_tag) {}

}  // namespace

UnindexedRulesetInfo::UnindexedRulesetInfo() = default;
UnindexedRulesetInfo::~UnindexedRulesetInfo() = default;
UnindexedRulesetInfo::UnindexedRulesetInfo(const UnindexedRulesetInfo&) =
    default;
UnindexedRulesetInfo& UnindexedRulesetInfo::operator=(
    const UnindexedRulesetInfo&) = default;

IndexedRulesetVersion::IndexedRulesetVersion(std::string_view filter_tag)
    :{}
// TODO(crbug.com/40280666): Convert |content_version| and |filter_tag| to
// std::string_view.
IndexedRulesetVersion::IndexedRulesetVersion(std::string_view content_version,
                                             int format_version,
                                             std::string_view filter_tag)
    :{}
IndexedRulesetVersion::~IndexedRulesetVersion() = default;
IndexedRulesetVersion& IndexedRulesetVersion::operator=(
    const IndexedRulesetVersion&) = default;

// static
void IndexedRulesetVersion::RegisterPrefs(PrefRegistrySimple* registry,
                                          std::string_view filter_tag) {}

// static
int IndexedRulesetVersion::CurrentFormatVersion() {}

void IndexedRulesetVersion::ReadFromPrefs(PrefService* local_state) {}

bool IndexedRulesetVersion::IsValid() const {}

bool IndexedRulesetVersion::IsCurrentFormatVersion() const {}

void IndexedRulesetVersion::SaveToPrefs(PrefService* local_state) const {}

std::unique_ptr<base::trace_event::TracedValue>
IndexedRulesetVersion::ToTracedValue() const {}

}  // namespace subresource_filter