chromium/chrome/browser/push_messaging/push_messaging_app_identifier.cc

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

#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"

#include <string.h>

#include "base/check_op.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/uuid.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

constexpr char kPushMessagingAppIdentifierPrefix[] =;
constexpr char kInstanceIDGuidSuffix[] =;

namespace {

// sizeof is strlen + 1 since it's null-terminated.
constexpr size_t kPrefixLength =;
constexpr size_t kGuidSuffixLength =;

// Ok to use '#' as separator since only the origin of the url is used.
constexpr char kPrefValueSeparator =;
constexpr size_t kGuidLength =;  // "%08X-%04X-%04X-%04X-%012llX"

std::string FromTimeToString(base::Time time) {}

bool FromStringToTime(const std::string& time_string,
                      std::optional<base::Time>* time) {}

std::string MakePrefValue(
    const GURL& origin,
    int64_t service_worker_registration_id,
    const std::optional<base::Time>& expiration_time = std::nullopt) {}

bool DisassemblePrefValue(const std::string& pref_value,
                          GURL* origin,
                          int64_t* service_worker_registration_id,
                          std::optional<base::Time>* expiration_time) {}

}  // namespace

// static
void PushMessagingAppIdentifier::RegisterProfilePrefs(
    user_prefs::PrefRegistrySyncable* registry) {}

// static
bool PushMessagingAppIdentifier::UseInstanceID(const std::string& app_id) {}

// static
PushMessagingAppIdentifier PushMessagingAppIdentifier::Generate(
    const GURL& origin,
    int64_t service_worker_registration_id,
    const std::optional<base::Time>& expiration_time) {}

// static
PushMessagingAppIdentifier PushMessagingAppIdentifier::LegacyGenerateForTesting(
    const GURL& origin,
    int64_t service_worker_registration_id,
    const std::optional<base::Time>& expiration_time) {}

// static
PushMessagingAppIdentifier PushMessagingAppIdentifier::GenerateInternal(
    const GURL& origin,
    int64_t service_worker_registration_id,
    bool use_instance_id,
    const std::optional<base::Time>& expiration_time) {}

// static
PushMessagingAppIdentifier PushMessagingAppIdentifier::FindByAppId(
    Profile* profile, const std::string& app_id) {}

// static
PushMessagingAppIdentifier PushMessagingAppIdentifier::FindByServiceWorker(
    Profile* profile,
    const GURL& origin,
    int64_t service_worker_registration_id) {}

// static
std::vector<PushMessagingAppIdentifier> PushMessagingAppIdentifier::GetAll(
    Profile* profile) {}

// static
void PushMessagingAppIdentifier::DeleteAllFromPrefs(Profile* profile) {}

// static
size_t PushMessagingAppIdentifier::GetCount(Profile* profile) {}

PushMessagingAppIdentifier::PushMessagingAppIdentifier(
    const PushMessagingAppIdentifier& other) = default;

PushMessagingAppIdentifier::PushMessagingAppIdentifier()
    :{}

PushMessagingAppIdentifier::PushMessagingAppIdentifier(
    const std::string& app_id,
    const GURL& origin,
    int64_t service_worker_registration_id,
    const std::optional<base::Time>& expiration_time)
    :{}

PushMessagingAppIdentifier::~PushMessagingAppIdentifier() {}

bool PushMessagingAppIdentifier::IsExpired() const {}

void PushMessagingAppIdentifier::PersistToPrefs(Profile* profile) const {}

void PushMessagingAppIdentifier::DeleteFromPrefs(Profile* profile) const {}

void PushMessagingAppIdentifier::DCheckValid() const {}