#include "chrome/browser/notifications/scheduler/internal/impression_store.h"
#include "chrome/browser/notifications/scheduler/internal/proto_conversion.h"
namespace leveldb_proto {
void DataToProto(notifications::ClientState* client_state,
notifications::proto::ClientState* proto) { … }
void ProtoToData(notifications::proto::ClientState* proto,
notifications::ClientState* client_state) { … }
}
namespace notifications {
ImpressionStore::ImpressionStore(
std::unique_ptr<
leveldb_proto::ProtoDatabase<proto::ClientState, ClientState>> db)
: … { … }
ImpressionStore::~ImpressionStore() = default;
void ImpressionStore::InitAndLoad(LoadCallback callback) { … }
void ImpressionStore::OnDbInitialized(LoadCallback callback,
leveldb_proto::Enums::InitStatus status) { … }
void ImpressionStore::OnDataLoaded(LoadCallback callback,
bool success,
std::unique_ptr<EntryVector> entry_vector) { … }
void ImpressionStore::Add(const std::string& key,
const ClientState& client_state,
UpdateCallback callback) { … }
void ImpressionStore::Update(const std::string& key,
const ClientState& client_state,
UpdateCallback callback) { … }
void ImpressionStore::Delete(const std::string& key, UpdateCallback callback) { … }
}