chromium/content/browser/notifications/notification_storage.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/notifications/notification_storage.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "content/browser/notifications/notification_database_conversions.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"

namespace content {

namespace {

// Schema is as follows:
// KEY: NOTIFICATION_<|data.notification_id|>
// VALUE: <serialized content::proto::NotificationDatabaseData>

const char kNotificationPrefix[] =;

// Create the key that will be used for the service worker database.
std::string CreateDataKey(const std::string& notification_id) {}

// Updates the time of the last click on the notification, and the first if
// necessary.
void UpdateNotificationClickTimestamps(NotificationDatabaseData* data) {}

}  // namespace

NotificationStorage::NotificationStorage(
    scoped_refptr<ServiceWorkerContextWrapper> service_worker_context)
    :{}

NotificationStorage::~NotificationStorage() = default;

void NotificationStorage::WriteNotificationData(
    const NotificationDatabaseData& data,
    PlatformNotificationContext::WriteResultCallback callback) {}

void NotificationStorage::OnWriteComplete(
    const NotificationDatabaseData& data,
    PlatformNotificationContext::WriteResultCallback callback,
    blink::ServiceWorkerStatusCode status) {}

void NotificationStorage::ReadNotificationDataAndRecordInteraction(
    int64_t service_worker_registration_id,
    const std::string& notification_id,
    PlatformNotificationContext::Interaction interaction,
    PlatformNotificationContext::ReadResultCallback callback) {}

void NotificationStorage::OnReadCompleteUpdateInteraction(
    int64_t service_worker_registration_id,
    PlatformNotificationContext::Interaction interaction,
    PlatformNotificationContext::ReadResultCallback callback,
    const std::vector<std::string>& database_data,
    blink::ServiceWorkerStatusCode status) {}

void NotificationStorage::OnInteractionUpdateComplete(
    std::unique_ptr<NotificationDatabaseData> data,
    PlatformNotificationContext::ReadResultCallback callback,
    blink::ServiceWorkerStatusCode status) {}

}  // namespace content