chromium/components/os_crypt/sync/libsecret_util_linux.cc

// Copyright 2016 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/os_crypt/sync/libsecret_util_linux.h"

#include <dlfcn.h>

#include "base/check_op.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_number_conversions.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"

//
// LibsecretLoader
//

namespace {

// TODO(crbug.com/40490926) A message that is attached to useless entries that
// we create, to explain its existence.
const char kExplanationMessage[] =;

// gnome-keyring-daemon has a bug that causes libsecret to deadlock on startup.
// This function checks for the deadlock condition.  See [1] for a more detailed
// explanation of the issue.
// [1] https://chromium-review.googlesource.com/c/chromium/src/+/5787619
bool CanUseLibsecret() {}

}  // namespace

decltype(
    &::secret_password_store_sync) LibsecretLoader::secret_password_store_sync =;
decltype(
    &::secret_service_search_sync) LibsecretLoader::secret_service_search_sync =;
decltype(
    &::secret_password_clear_sync) LibsecretLoader::secret_password_clear_sync =;
decltype(&::secret_item_get_secret) LibsecretLoader::secret_item_get_secret =;
decltype(&::secret_item_get_created) LibsecretLoader::secret_item_get_created =;
decltype(
    &::secret_item_get_modified) LibsecretLoader::secret_item_get_modified =;
decltype(&::secret_value_get_text) LibsecretLoader::secret_value_get_text =;
decltype(
    &::secret_item_get_attributes) LibsecretLoader::secret_item_get_attributes =;
decltype(&::secret_item_load_secret_sync)
    LibsecretLoader::secret_item_load_secret_sync =;
decltype(&::secret_value_unref) LibsecretLoader::secret_value_unref =;

bool LibsecretLoader::libsecret_loaded_ =;

const LibsecretLoader::FunctionInfo LibsecretLoader::kFunctions[] =;

LibsecretLoader::SearchHelper::SearchHelper() = default;
LibsecretLoader::SearchHelper::~SearchHelper() = default;

void LibsecretLoader::SearchHelper::Search(const SecretSchema* schema,
                                           GHashTable* attrs,
                                           int flags) {}

// static
bool LibsecretLoader::EnsureLibsecretLoaded() {}

// static
bool LibsecretLoader::LoadLibsecret() {}

// static
bool LibsecretLoader::LibsecretIsAvailable() {}

// TODO(crbug.com/40490926) This is needed to properly unlock the default
// keyring. We don't need to ever read it.
void LibsecretLoader::EnsureKeyringUnlocked() {}

//
// LibsecretAttributesBuilder
//

LibsecretAttributesBuilder::LibsecretAttributesBuilder() {}

LibsecretAttributesBuilder::~LibsecretAttributesBuilder() {}

void LibsecretAttributesBuilder::Append(const std::string& name,
                                        const std::string& value) {}

void LibsecretAttributesBuilder::Append(const std::string& name,
                                        int64_t value) {}