chromium/components/sync_preferences/dual_layer_user_pref_store.cc

// Copyright 2023 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/sync_preferences/dual_layer_user_pref_store.h"

#include <optional>
#include <string>
#include <string_view>
#include <utility>

#include "base/auto_reset.h"
#include "base/barrier_closure.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "build/chromeos_buildflags.h"
#include "components/sync/service/sync_service.h"
#include "components/sync/service/sync_user_settings.h"
#include "components/sync_preferences/pref_model_associator_client.h"
#include "components/sync_preferences/preferences_merge_helper.h"
#include "components/sync_preferences/syncable_prefs_database.h"

namespace sync_preferences {

DualLayerUserPrefStore::UnderlyingPrefStoreObserver::
    UnderlyingPrefStoreObserver(DualLayerUserPrefStore* outer,
                                bool is_account_store)
    :{}

void DualLayerUserPrefStore::UnderlyingPrefStoreObserver::OnPrefValueChanged(
    std::string_view key) {}

void DualLayerUserPrefStore::UnderlyingPrefStoreObserver::
    OnInitializationCompleted(bool succeeded) {}

bool DualLayerUserPrefStore::UnderlyingPrefStoreObserver::
    initialization_succeeded() const {}

DualLayerUserPrefStore::DualLayerUserPrefStore(
    scoped_refptr<PersistentPrefStore> local_pref_store,
    scoped_refptr<PersistentPrefStore> account_pref_store,
    scoped_refptr<PrefModelAssociatorClient> pref_model_associator_client)
    :{}

DualLayerUserPrefStore::~DualLayerUserPrefStore() {}

scoped_refptr<PersistentPrefStore> DualLayerUserPrefStore::GetLocalPrefStore() {}

scoped_refptr<WriteablePrefStore>
DualLayerUserPrefStore::GetAccountPrefStore() {}

void DualLayerUserPrefStore::AddObserver(Observer* observer) {}

void DualLayerUserPrefStore::RemoveObserver(Observer* observer) {}

bool DualLayerUserPrefStore::HasObservers() const {}

bool DualLayerUserPrefStore::IsInitializationComplete() const {}

bool DualLayerUserPrefStore::GetValue(std::string_view key,
                                      const base::Value** result) const {}

base::Value::Dict DualLayerUserPrefStore::GetValues() const {}

void DualLayerUserPrefStore::SetValue(std::string_view key,
                                      base::Value value,
                                      uint32_t flags) {}

void DualLayerUserPrefStore::RemoveValue(std::string_view key, uint32_t flags) {}

bool DualLayerUserPrefStore::GetMutableValue(std::string_view key,
                                             base::Value** result) {}

void DualLayerUserPrefStore::ReportValueChanged(std::string_view key,
                                                uint32_t flags) {}

void DualLayerUserPrefStore::SetValueSilently(std::string_view key,
                                              base::Value value,
                                              uint32_t flags) {}

void DualLayerUserPrefStore::RemoveValuesByPrefixSilently(
    std::string_view prefix) {}

bool DualLayerUserPrefStore::ReadOnly() const {}

PersistentPrefStore::PrefReadError DualLayerUserPrefStore::GetReadError()
    const {}

PersistentPrefStore::PrefReadError DualLayerUserPrefStore::ReadPrefs() {}

void DualLayerUserPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate) {}

void DualLayerUserPrefStore::CommitPendingWrite(
    base::OnceClosure reply_callback,
    base::OnceClosure synchronous_done_callback) {}

void DualLayerUserPrefStore::SchedulePendingLossyWrites() {}

void DualLayerUserPrefStore::OnStoreDeletionFromDisk() {}

bool DualLayerUserPrefStore::ShouldSetValueInAccountStore(
    std::string_view key) const {}

bool DualLayerUserPrefStore::ShouldGetValueFromAccountStore(
    std::string_view key) const {}

void DualLayerUserPrefStore::EnableType(syncer::DataType data_type) {}

void DualLayerUserPrefStore::DisableTypeAndClearAccountStore(
    syncer::DataType data_type) {}

bool DualLayerUserPrefStore::IsPrefKeyMergeable(std::string_view key) const {}

const base::Value* DualLayerUserPrefStore::MaybeMerge(
    std::string_view pref_name,
    const base::Value& local_value,
    const base::Value& account_value) const {}

base::Value* DualLayerUserPrefStore::MaybeMerge(std::string_view pref_name,
                                                base::Value& local_value,
                                                base::Value& account_value) {}

std::pair<base::Value, base::Value> DualLayerUserPrefStore::UnmergeValue(
    std::string_view pref_name,
    base::Value value,
    uint32_t flags) const {}

bool DualLayerUserPrefStore::IsInitializationSuccessful() const {}

std::vector<std::string> DualLayerUserPrefStore::GetPrefNamesInAccountStore()
    const {}

base::flat_set<syncer::DataType> DualLayerUserPrefStore::GetActiveTypesForTest()
    const {}

bool DualLayerUserPrefStore::IsHistorySyncEnabled() const {}

bool DualLayerUserPrefStore::IsHistorySyncEnabledForTest() const {}

void DualLayerUserPrefStore::SetIsHistorySyncEnabledForTest(
    bool is_history_sync_enabled) {}

void DualLayerUserPrefStore::OnSyncServiceInitialized(
    syncer::SyncService* sync_service) {}

void DualLayerUserPrefStore::OnStateChanged(syncer::SyncService* sync_service) {}

void DualLayerUserPrefStore::OnSyncShutdown(syncer::SyncService* sync_service) {}

void DualLayerUserPrefStore::SetValueInAccountStoreOnly(std::string_view key,
                                                        base::Value value,
                                                        uint32_t flags) {}

bool DualLayerUserPrefStore::HasReadErrorDelegate() const {}

}  // namespace sync_preferences