OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // Manifest processing for JSON manifests. | 7 // Manifest processing for JSON manifests. |
8 | 8 |
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ |
10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // value is true if the manifest parses correctly and matches the schema. | 47 // value is true if the manifest parses correctly and matches the schema. |
48 bool Init(const nacl::string& json, ErrorInfo* error_info); | 48 bool Init(const nacl::string& json, ErrorInfo* error_info); |
49 | 49 |
50 // Gets the full program URL for the current sandbox ISA from the | 50 // Gets the full program URL for the current sandbox ISA from the |
51 // manifest file. | 51 // manifest file. |
52 virtual bool GetProgramURL(nacl::string* full_url, | 52 virtual bool GetProgramURL(nacl::string* full_url, |
53 PP_PNaClOptions* pnacl_options, | 53 PP_PNaClOptions* pnacl_options, |
54 bool* uses_nonsfi_mode, | 54 bool* uses_nonsfi_mode, |
55 ErrorInfo* error_info) const; | 55 ErrorInfo* error_info) const; |
56 | 56 |
57 // Gets the file names from the "files" section of the manifest. No | |
58 // checking that the keys' values are proper ISA dictionaries -- it | |
59 // is assumed that other consistency checks take care of that, and | |
60 // that the keys are appropriate for use with ResolveKey. | |
61 virtual bool GetFileKeys(std::set<nacl::string>* keys) const; | |
62 | |
63 // Resolves a key from the "files" section to a fully resolved URL, | 57 // Resolves a key from the "files" section to a fully resolved URL, |
64 // i.e., relative URL values are fully expanded relative to the | 58 // i.e., relative URL values are fully expanded relative to the |
65 // manifest's URL (via ResolveURL). | 59 // manifest's URL (via ResolveURL). |
66 // If there was an error, details are reported via error_info. | 60 // If there was an error, details are reported via error_info. |
67 virtual bool ResolveKey(const nacl::string& key, | 61 virtual bool ResolveKey(const nacl::string& key, |
68 nacl::string* full_url, | 62 nacl::string* full_url, |
69 PP_PNaClOptions* pnacl_options, | 63 PP_PNaClOptions* pnacl_options, |
70 ErrorInfo* error_info) const; | 64 ErrorInfo* error_info) const; |
71 | 65 |
72 private: | 66 private: |
(...skipping 27 matching lines...) Expand all Loading... |
100 nacl::string sandbox_isa_; | 94 nacl::string sandbox_isa_; |
101 bool nonsfi_enabled_; | 95 bool nonsfi_enabled_; |
102 bool pnacl_debug_; | 96 bool pnacl_debug_; |
103 | 97 |
104 Json::Value dictionary_; | 98 Json::Value dictionary_; |
105 }; | 99 }; |
106 | 100 |
107 } // namespace plugin | 101 } // namespace plugin |
108 | 102 |
109 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ | 103 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ |
OLD | NEW |