Index: third_party/WebKit/Source/web/WebInstalledAppVerificationManager.cpp |
diff --git a/third_party/WebKit/Source/web/WebInstalledAppVerificationManager.cpp b/third_party/WebKit/Source/web/WebInstalledAppVerificationManager.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1a71cefef52de9a46350b821665bb14e4cc2d941 |
--- /dev/null |
+++ b/third_party/WebKit/Source/web/WebInstalledAppVerificationManager.cpp |
@@ -0,0 +1,34 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "bindings/core/v8/Dictionary.h" |
+#include "public/platform/WebVector.h" |
+#include "public/web/WebInstalledAppVerificationManager.h" |
+#include "modules/installedapp/InstalledAppVerificationManager.h" |
+// INCLUDE |
+ |
+namespace blink { |
+ |
+WebInstalledAppVerificationManager::WebInstalledAppVerificationManager(const Dictionary& dictionary) |
+{ |
+ String androidPackageString; |
+ DictionaryHelper::get(dictionary, String("packageName"), androidPackageString); |
+ androidPackage = androidPackageString; |
+ |
+ Vector<String> dictValue; |
+ if (!DictionaryHelper::get(dictionary, String("signingKey"), dictValue)) { |
+ String singleKey; |
+ bool isSingleKey = DictionaryHelper::get(dictionary, String("signingKey"), singleKey); |
+ if (isSingleKey) { |
+ WebVector<WebString> result(static_cast<size_t>(1)); |
+ result[0] = singleKey; |
+ keys = result; |
+ } |
+ } else { |
+ keys = dictValue; |
+ } |
+} |
+ |
+} // namespace blink |