OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H | 5 #ifndef COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H | 6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // true if the manifest parses correctly and matches the schema. | 43 // true if the manifest parses correctly and matches the schema. |
44 bool Init(const std::string& json_manifest, ErrorInfo* error_info); | 44 bool Init(const std::string& json_manifest, ErrorInfo* error_info); |
45 | 45 |
46 // Gets the full program URL for the current sandbox ISA from the | 46 // Gets the full program URL for the current sandbox ISA from the |
47 // manifest file. | 47 // manifest file. |
48 bool GetProgramURL(std::string* full_url, | 48 bool GetProgramURL(std::string* full_url, |
49 PP_PNaClOptions* pnacl_options, | 49 PP_PNaClOptions* pnacl_options, |
50 bool* uses_nonsfi_mode, | 50 bool* uses_nonsfi_mode, |
51 ErrorInfo* error_info) const; | 51 ErrorInfo* error_info) const; |
52 | 52 |
| 53 // Gets all the URLs in the "files" section. |
| 54 bool GetFilesUrl(std::vector<std::string>* full_urls, |
| 55 std::vector<std::string>* keys) const; |
| 56 |
53 // 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, |
54 // i.e., relative URL values are fully expanded relative to the | 58 // i.e., relative URL values are fully expanded relative to the |
55 // manifest's URL (via ResolveURL). | 59 // manifest's URL (via ResolveURL). |
56 // If there was an error, details are reported via error_info. | 60 // If there was an error, details are reported via error_info. |
57 bool ResolveKey(const std::string& key, | 61 bool ResolveKey(const std::string& key, |
58 std::string* full_url, | 62 std::string* full_url, |
59 PP_PNaClOptions* pnacl_options) const; | 63 PP_PNaClOptions* pnacl_options) const; |
60 | 64 |
61 private: | 65 private: |
62 bool MatchesSchema(ErrorInfo* error_info); | 66 bool MatchesSchema(ErrorInfo* error_info); |
(...skipping 13 matching lines...) Expand all Loading... |
76 bool nonsfi_enabled_; | 80 bool nonsfi_enabled_; |
77 bool pnacl_debug_; | 81 bool pnacl_debug_; |
78 | 82 |
79 // The dictionary of manifest information parsed in Init(). | 83 // The dictionary of manifest information parsed in Init(). |
80 Json::Value dictionary_; | 84 Json::Value dictionary_; |
81 }; | 85 }; |
82 | 86 |
83 } // namespace nacl | 87 } // namespace nacl |
84 | 88 |
85 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H | 89 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
OLD | NEW |