Chromium Code Reviews| Index: Source/modules/notifications/NotificationEvent.cpp |
| diff --git a/Source/modules/notifications/NotificationEvent.cpp b/Source/modules/notifications/NotificationEvent.cpp |
| index d04fcb393825d4b6f4660885a3c530f0ad671fe4..619f284489ebc61861dbd3c4db5ade3d53c77a46 100644 |
| --- a/Source/modules/notifications/NotificationEvent.cpp |
| +++ b/Source/modules/notifications/NotificationEvent.cpp |
| @@ -4,29 +4,27 @@ |
| #include "config.h" |
| #include "modules/notifications/NotificationEvent.h" |
| -#include "wtf/text/WTFString.h" |
| namespace blink { |
| -NotificationEvent::NotificationEvent() |
| - : m_action(emptyString()) |
| -{ |
| -} |
| +NotificationEvent::NotificationEvent() { } |
| NotificationEvent::NotificationEvent(const AtomicString& type, const NotificationEventInit& initializer) |
| : ExtendableEvent(type, initializer) |
|
Peter Beverloo
2015/08/07 07:25:25
Use a delegated constructor w/ observer==nullptr?
|
| - , m_action(initializer.action()) |
| { |
| if (initializer.hasNotification()) |
| m_notification = initializer.notification(); |
| + if (initializer.hasAction()) |
|
Peter Beverloo
2015/08/07 07:25:25
You explicitly used "emptyString()" before, now we
|
| + m_action = initializer.action(); |
| } |
| NotificationEvent::NotificationEvent(const AtomicString& type, const NotificationEventInit& initializer, WaitUntilObserver* observer) |
| : ExtendableEvent(type, initializer, observer) |
| - , m_action(initializer.action()) |
| { |
| if (initializer.hasNotification()) |
| m_notification = initializer.notification(); |
| + if (initializer.hasAction()) |
| + m_action = initializer.action(); |
| } |
| NotificationEvent::~NotificationEvent() |