chromium/ui/message_center/public/cpp/notifier_id.cc

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

#include "ui/message_center/public/cpp/notifier_id.h"
#include "base/check.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"

namespace message_center {

#if BUILDFLAG(IS_CHROMEOS)
NotifierId::NotifierId()
    : type(NotifierType::SYSTEM_COMPONENT),
      catalog_name(ash::NotificationCatalogName::kNone) {}
#else
NotifierId::NotifierId() :{}
#endif  // IS_CHROMEOS

#if BUILDFLAG(IS_CHROMEOS_ASH)
NotifierId::NotifierId(NotifierType type,
                       const std::string& id,
                       ash::NotificationCatalogName catalog_name)
    : type(type), id(id), catalog_name(catalog_name) {
  if (type == NotifierType::SYSTEM_COMPONENT) {
    DCHECK_NE(catalog_name, ash::NotificationCatalogName::kNone)
        << " System Notifications must include a `catalog_name`.";
  }
  DCHECK_NE(type, NotifierType::WEB_PAGE);
  DCHECK(!id.empty());
}
#else
NotifierId::NotifierId(NotifierType type, const std::string& id)
    :{}
#endif  // IS_CHROMEOS_ASH

NotifierId::NotifierId(const GURL& origin)
    :{}

NotifierId::NotifierId(const GURL& url,
                       std::optional<std::u16string> title,
                       std::optional<std::string> web_app_id)
    :{}

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

NotifierId::~NotifierId() = default;

bool NotifierId::operator==(const NotifierId& other) const {}

bool NotifierId::operator<(const NotifierId& other) const {}

}  // namespace message_center