chromium/components/browsing_topics/browsing_topics_state.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_topics/browsing_topics_state.h"

#include "base/base64.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/json/values_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "components/browsing_topics/common/common_types.h"
#include "components/browsing_topics/util.h"
#include "third_party/blink/public/common/features.h"

namespace browsing_topics {

namespace {

// How often the file is saved at most.
const base::TimeDelta kSaveDelay =;

const char kEpochsNameKey[] =;
const char kNextScheduledCalculationTimeNameKey[] =;
const char kHexEncodedHmacKeyNameKey[] =;

// `config_version` is a deprecated key. Do not reuse.

std::unique_ptr<BrowsingTopicsState::LoadResult> LoadFileOnBackendTaskRunner(
    const base::FilePath& file_path) {}

bool AreConfigVersionsCompatible(int preexisting, int current) {}

}  // namespace

BrowsingTopicsState::LoadResult::LoadResult(bool file_exists,
                                            std::unique_ptr<base::Value> value)
    :{}

BrowsingTopicsState::LoadResult::~LoadResult() = default;

BrowsingTopicsState::BrowsingTopicsState(const base::FilePath& profile_path,
                                         base::OnceClosure loaded_callback)
    :{}

BrowsingTopicsState::~BrowsingTopicsState() {}

void BrowsingTopicsState::ClearAllTopics() {}

void BrowsingTopicsState::ClearOneEpoch(size_t epoch_index) {}

void BrowsingTopicsState::ClearTopic(Topic topic) {}

void BrowsingTopicsState::ClearContextDomain(
    const HashedDomain& hashed_context_domain) {}

std::optional<EpochTopics> BrowsingTopicsState::AddEpoch(
    EpochTopics epoch_topics) {}

void BrowsingTopicsState::UpdateNextScheduledCalculationTime(
    base::TimeDelta delay) {}

std::vector<const EpochTopics*> BrowsingTopicsState::EpochsForSite(
    const std::string& top_domain) const {}

bool BrowsingTopicsState::HasScheduledSaveForTesting() const {}

base::TimeDelta BrowsingTopicsState::CalculateSiteStickyTimeDelta(
    const std::string& top_domain) const {}

base::ImportantFileWriter::BackgroundDataProducerCallback
BrowsingTopicsState::GetSerializedDataProducerForBackgroundSequence() {}

base::Value::Dict BrowsingTopicsState::ToDictValue() const {}

void BrowsingTopicsState::ScheduleSave() {}

void BrowsingTopicsState::DidLoadFile(base::OnceClosure loaded_callback,
                                      std::unique_ptr<LoadResult> load_result) {}

BrowsingTopicsState::ParseResult BrowsingTopicsState::ParseValue(
    const base::Value& value) {}

}  // namespace browsing_topics