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

Unified Diff: third_party/WebKit/Source/web/WebInstalledAppVerificationManager.cpp

Issue 1586563009: IsNativeAppInstalled Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: 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
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698