#include "components/power_bookmarks/storage/power_bookmark_backend.h"
#include "base/task/sequenced_task_runner.h"
#include "components/power_bookmarks/common/power_bookmark_metrics.h"
#include "components/power_bookmarks/common/search_params.h"
#include "components/power_bookmarks/storage/empty_power_bookmark_database.h"
#include "components/power_bookmarks/storage/power_bookmark_database_impl.h"
#include "components/power_bookmarks/storage/power_bookmark_sync_bridge.h"
#include "components/power_bookmarks/storage/power_bookmark_sync_metadata_database.h"
#include "components/sync/model/client_tag_based_data_type_processor.h"
namespace power_bookmarks {
PowerBookmarkBackend::PowerBookmarkBackend(
const base::FilePath& database_dir,
scoped_refptr<base::SequencedTaskRunner> frontend_task_runner,
base::WeakPtr<PowerBookmarkObserver> service_observer)
: … { … }
PowerBookmarkBackend::~PowerBookmarkBackend() { … }
void PowerBookmarkBackend::Init(bool use_database) { … }
base::WeakPtr<syncer::DataTypeControllerDelegate>
PowerBookmarkBackend::GetSyncControllerDelegate() { … }
std::vector<std::unique_ptr<Power>> PowerBookmarkBackend::GetPowersForURL(
const GURL& url,
const sync_pb::PowerBookmarkSpecifics::PowerType& power_type) { … }
std::vector<std::unique_ptr<PowerOverview>>
PowerBookmarkBackend::GetPowerOverviewsForType(
const sync_pb::PowerBookmarkSpecifics::PowerType& power_type) { … }
std::vector<std::unique_ptr<Power>> PowerBookmarkBackend::SearchPowers(
const SearchParams& search_params) { … }
std::vector<std::unique_ptr<PowerOverview>>
PowerBookmarkBackend::SearchPowerOverviews(const SearchParams& search_params) { … }
bool PowerBookmarkBackend::CreatePower(std::unique_ptr<Power> power) { … }
bool PowerBookmarkBackend::UpdatePower(std::unique_ptr<Power> power) { … }
bool PowerBookmarkBackend::DeletePower(const base::Uuid& guid) { … }
bool PowerBookmarkBackend::DeletePowersForURL(
const GURL& url,
const sync_pb::PowerBookmarkSpecifics::PowerType& power_type) { … }
std::vector<std::unique_ptr<Power>> PowerBookmarkBackend::GetAllPowers() { … }
std::vector<std::unique_ptr<Power>> PowerBookmarkBackend::GetPowersForGUIDs(
const std::vector<std::string>& guids) { … }
std::unique_ptr<Power> PowerBookmarkBackend::GetPowerForGUID(
const std::string& guid) { … }
bool PowerBookmarkBackend::CreateOrMergePowerFromSync(const Power& power) { … }
bool PowerBookmarkBackend::DeletePowerFromSync(const std::string& guid) { … }
PowerBookmarkSyncMetadataDatabase*
PowerBookmarkBackend::GetSyncMetadataDatabase() { … }
std::unique_ptr<Transaction> PowerBookmarkBackend::BeginTransaction() { … }
bool PowerBookmarkBackend::CommitAndNotify(Transaction& transaction) { … }
void PowerBookmarkBackend::NotifyPowersChanged() { … }
}