Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1493)

Unified Diff: Source/modules/notifications/Notification.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/notifications/Notification.cpp
diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp
index 160a8e928609e977715768e8ec192b0e145dd78c..00b8b33cc0c2305112af153add48aca4cd4c78bc 100644
--- a/Source/modules/notifications/Notification.cpp
+++ b/Source/modules/notifications/Notification.cpp
@@ -32,6 +32,7 @@
#include "modules/notifications/Notification.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/Document.h"
#include "core/events/Event.h"
@@ -48,15 +49,15 @@ Notification* Notification::create(ExecutionContext* context, const String& titl
Notification* notification = adoptRefCountedGarbageCollectedWillBeNoop(new Notification(title, context, &client));
String argument;
- if (options.get("body", argument))
+ if (DictionaryHelper::get(options, "body", argument))
notification->setBody(argument);
- if (options.get("tag", argument))
+ if (DictionaryHelper::get(options, "tag", argument))
notification->setTag(argument);
- if (options.get("lang", argument))
+ if (DictionaryHelper::get(options, "lang", argument))
notification->setLang(argument);
- if (options.get("dir", argument))
+ if (DictionaryHelper::get(options, "dir", argument))
notification->setDir(argument);
- if (options.get("icon", argument)) {
+ if (DictionaryHelper::get(options, "icon", argument)) {
KURL iconUrl = argument.isEmpty() ? KURL() : context->completeURL(argument);
if (!iconUrl.isEmpty() && iconUrl.isValid())
notification->setIconUrl(iconUrl);

Powered by Google App Engine
This is Rietveld 408576698