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

Unified Diff: Source/modules/geolocation/PositionOptions.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed LICENSE and windows build 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/geolocation/PositionOptions.cpp
diff --git a/Source/modules/geolocation/PositionOptions.cpp b/Source/modules/geolocation/PositionOptions.cpp
index d6f79d04a7754f53a5f09206f83207f1020a76f8..70167ef4b6d9ebf70b07093b05970cf5dede7553 100644
--- a/Source/modules/geolocation/PositionOptions.cpp
+++ b/Source/modules/geolocation/PositionOptions.cpp
@@ -6,6 +6,7 @@
#include "modules/geolocation/PositionOptions.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include <limits.h>
namespace WebCore {
@@ -21,10 +22,10 @@ PositionOptions::PositionOptions(const Dictionary& options)
, m_timeout(std::numeric_limits<unsigned>::max())
{
if (options.hasProperty("enableHighAccuracy"))
- options.get("enableHighAccuracy", m_highAccuracy);
+ DictionaryHelper::get(options, "enableHighAccuracy", m_highAccuracy);
if (options.hasProperty("maximumAge")) {
double maximumAge;
- options.get("maximumAge", maximumAge);
+ DictionaryHelper::get(options, "maximumAge", maximumAge);
if (maximumAge < 0)
m_maximumAge = 0;
else if (maximumAge > std::numeric_limits<unsigned>::max())
@@ -34,7 +35,7 @@ PositionOptions::PositionOptions(const Dictionary& options)
}
if (options.hasProperty("timeout")) {
double timeout;
- options.get("timeout", timeout);
+ DictionaryHelper::get(options, "timeout", timeout);
if (timeout < 0)
m_timeout = 0;
else if (timeout > std::numeric_limits<unsigned>::max())

Powered by Google App Engine
This is Rietveld 408576698