OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "bindings/core/v8/Dictionary.h" |
| 7 #include "public/platform/WebVector.h" |
| 8 #include "public/web/WebInstalledAppVerificationManager.h" |
| 9 #include "modules/installedapp/InstalledAppVerificationManager.h" |
| 10 // INCLUDE |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 WebInstalledAppVerificationManager::WebInstalledAppVerificationManager(const Dic
tionary& dictionary) |
| 15 { |
| 16 String androidPackageString; |
| 17 DictionaryHelper::get(dictionary, String("packageName"), androidPackageStrin
g); |
| 18 androidPackage = androidPackageString; |
| 19 |
| 20 Vector<String> dictValue; |
| 21 if (!DictionaryHelper::get(dictionary, String("signingKey"), dictValue)) { |
| 22 String singleKey; |
| 23 bool isSingleKey = DictionaryHelper::get(dictionary, String("signingKey"
), singleKey); |
| 24 if (isSingleKey) { |
| 25 WebVector<WebString> result(static_cast<size_t>(1)); |
| 26 result[0] = singleKey; |
| 27 keys = result; |
| 28 } |
| 29 } else { |
| 30 keys = dictValue; |
| 31 } |
| 32 } |
| 33 |
| 34 } // namespace blink |
OLD | NEW |