chromium/components/services/app_service/public/cpp/preferred_apps_impl.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/services/app_service/public/cpp/preferred_apps_impl.h"

#include <iterator>
#include <utility>

#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/sequence_checker.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h"
#include "components/services/app_service/public/cpp/intent_filter_util.h"
#include "components/services/app_service/public/cpp/preferred_apps_converter.h"

namespace {

const base::FilePath::CharType kPreferredAppsDirname[] =);

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class PreferredAppsFileIOAction {};

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class PreferredAppsUpdateAction {};

void LogPreferredAppEntryCount(int entry_count) {}

// Performs blocking I/O. Called on another thread.
void WriteDataBlocking(const base::FilePath& preferred_apps_file,
                       const std::string& preferred_apps) {}

// Performs blocking I/O. Called on another thread.
std::string ReadDataBlocking(const base::FilePath& preferred_apps_file) {}

}  // namespace

namespace apps {

PreferredAppsImpl::PreferredAppsImpl(
    Host* host,
    const base::FilePath& profile_dir,
    base::OnceClosure read_completed_for_testing,
    base::OnceClosure write_completed_for_testing)
    :{}

PreferredAppsImpl::~PreferredAppsImpl() {}

void PreferredAppsImpl::RemovePreferredApp(const std::string& app_id) {}

void PreferredAppsImpl::SetSupportedLinksPreference(
    const std::string& app_id,
    IntentFilters all_link_filters) {}

void PreferredAppsImpl::RemoveSupportedLinksPreference(
    const std::string& app_id) {}

void PreferredAppsImpl::InitializePreferredApps() {}

void PreferredAppsImpl::WriteToJSON(
    const base::FilePath& profile_dir,
    const apps::PreferredAppsList& preferred_apps) {}

void PreferredAppsImpl::WriteCompleted() {}

void PreferredAppsImpl::ReadFromJSON(const base::FilePath& profile_dir) {}

void PreferredAppsImpl::ReadCompleted(std::string preferred_apps_string) {}

void PreferredAppsImpl::RunAfterPreferredAppsReady(base::OnceClosure task) {}

void PreferredAppsImpl::RemovePreferredAppImpl(const std::string& app_id) {}

void PreferredAppsImpl::SetSupportedLinksPreferenceImpl(
    const std::string& app_id,
    IntentFilters all_link_filters) {}

void PreferredAppsImpl::RemoveSupportedLinksPreferenceImpl(
    const std::string& app_id) {}

}  // namespace apps