| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "ui/message_center/notifier_settings.h" | 6 #include "ui/message_center/notifier_settings.h" |
| 7 | 7 |
| 8 namespace message_center { | 8 namespace message_center { |
| 9 | 9 |
| 10 NotifierId::NotifierId(NotifierType type, | 10 NotifierId::NotifierId(NotifierType type, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const string16& name, | 43 const string16& name, |
| 44 bool enabled) | 44 bool enabled) |
| 45 : notifier_id(notifier_id), | 45 : notifier_id(notifier_id), |
| 46 name(name), | 46 name(name), |
| 47 enabled(enabled) { | 47 enabled(enabled) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 Notifier::~Notifier() { | 50 Notifier::~Notifier() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 std::string ToString( | 53 NotifierGroup::NotifierGroup(const gfx::Image& icon, |
| 54 NotifierId::SystemComponentNotifierType type) { | 54 const string16& name, |
| 55 const string16& login_info, |
| 56 size_t index) |
| 57 : icon(icon), name(name), login_info(login_info), index(index) {} |
| 58 |
| 59 NotifierGroup::~NotifierGroup() {} |
| 60 |
| 61 std::string ToString(NotifierId::SystemComponentNotifierType type) { |
| 55 switch (type) { | 62 switch (type) { |
| 56 case NotifierId::SCREENSHOT: | 63 case NotifierId::SCREENSHOT: |
| 57 return "screenshot"; | 64 return "screenshot"; |
| 58 default: | 65 default: |
| 59 NOTREACHED(); | 66 NOTREACHED(); |
| 60 return ""; | 67 return ""; |
| 61 } | 68 } |
| 62 } | 69 } |
| 63 | 70 |
| 64 NotifierId::SystemComponentNotifierType | 71 NotifierId::SystemComponentNotifierType |
| 65 ParseSystemComponentName(const std::string& name) { | 72 ParseSystemComponentName(const std::string& name) { |
| 66 if (name == "screenshot") { | 73 if (name == "screenshot") { |
| 67 return NotifierId::SCREENSHOT; | 74 return NotifierId::SCREENSHOT; |
| 68 } else { | 75 } else { |
| 69 NOTREACHED(); | 76 NOTREACHED(); |
| 70 return NotifierId::NONE; | 77 return NotifierId::NONE; |
| 71 } | 78 } |
| 72 } | 79 } |
| 73 } // namespace message_center | 80 } // namespace message_center |
| OLD | NEW |