diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-12-11 21:33:03 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2013-12-13 12:34:07 +0100 |
commit | f2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch) | |
tree | 0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/ui/message_center/notifier_settings.cc | |
parent | 5362912cdb5eea702b68ebe23702468d17c3017a (diff) | |
download | qtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz |
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/ui/message_center/notifier_settings.cc')
-rw-r--r-- | chromium/ui/message_center/notifier_settings.cc | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/chromium/ui/message_center/notifier_settings.cc b/chromium/ui/message_center/notifier_settings.cc index 4355b9459fe..861e65b651f 100644 --- a/chromium/ui/message_center/notifier_settings.cc +++ b/chromium/ui/message_center/notifier_settings.cc @@ -11,15 +11,26 @@ NotifierId::NotifierId(NotifierType type, const std::string& id) : type(type), id(id), - system_component_type(NONE) { + system_component_type(-1) { DCHECK(type == APPLICATION || type == SYNCED_NOTIFICATION_SERVICE); + DCHECK(!id.empty()); } NotifierId::NotifierId(const GURL& url) - : type(WEB_PAGE), url(url), system_component_type(NONE) {} + : type(WEB_PAGE), + url(url), + system_component_type(-1) {} -NotifierId::NotifierId(SystemComponentNotifierType system_component_type) - : type(SYSTEM_COMPONENT), system_component_type(system_component_type) {} +NotifierId::NotifierId(int type) + : type(SYSTEM_COMPONENT), + system_component_type(type) { + DCHECK_LE(0, system_component_type); +} + +NotifierId::NotifierId() + : type(SYSTEM_COMPONENT), + system_component_type(-1) { +} bool NotifierId::operator==(const NotifierId& other) const { if (type != other.type) @@ -58,23 +69,4 @@ NotifierGroup::NotifierGroup(const gfx::Image& icon, NotifierGroup::~NotifierGroup() {} -std::string ToString(NotifierId::SystemComponentNotifierType type) { - switch (type) { - case NotifierId::SCREENSHOT: - return "screenshot"; - default: - NOTREACHED(); - return ""; - } -} - -NotifierId::SystemComponentNotifierType -ParseSystemComponentName(const std::string& name) { - if (name == "screenshot") { - return NotifierId::SCREENSHOT; - } else { - NOTREACHED(); - return NotifierId::NONE; - } -} } // namespace message_center |