1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #include "ui/message_center/notifier_settings.h"
8 namespace message_center {
10 NotifierId::NotifierId(NotifierType type,
11 const std::string& id)
14 system_component_type(-1) {
15 DCHECK(type == APPLICATION || type == SYNCED_NOTIFICATION_SERVICE);
19 NotifierId::NotifierId(const GURL& url)
22 system_component_type(-1) {}
24 NotifierId::NotifierId(int type)
25 : type(SYSTEM_COMPONENT),
26 system_component_type(type) {
27 DCHECK_LE(0, system_component_type);
30 NotifierId::NotifierId()
31 : type(SYSTEM_COMPONENT),
32 system_component_type(-1) {
35 bool NotifierId::operator==(const NotifierId& other) const {
36 if (type != other.type)
41 return url == other.url;
42 case SYSTEM_COMPONENT:
43 return system_component_type == other.system_component_type;
45 case SYNCED_NOTIFICATION_SERVICE:
46 return id == other.id;
53 Notifier::Notifier(const NotifierId& notifier_id,
56 : notifier_id(notifier_id),
61 Notifier::~Notifier() {
64 NotifierGroup::NotifierGroup(const gfx::Image& icon,
66 const string16& login_info,
68 : icon(icon), name(name), login_info(login_info), index(index) {}
70 NotifierGroup::~NotifierGroup() {}
72 } // namespace message_center