| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2011 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 file processing class. | 7 // Manifest file processing class. |
| 8 | 8 |
| 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
| 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // value is true if the manifest parses correctly and matches the schema. | 44 // value is true if the manifest parses correctly and matches the schema. |
| 45 bool Init(const nacl::string& json, ErrorInfo* error_info); | 45 bool Init(const nacl::string& json, ErrorInfo* error_info); |
| 46 | 46 |
| 47 // Gets the full program URL for the current sandbox ISA from the | 47 // Gets the full program URL for the current sandbox ISA from the |
| 48 // manifest file. Sets |is_portable| to |true| if the program is | 48 // manifest file. Sets |is_portable| to |true| if the program is |
| 49 // portable bitcode. | 49 // portable bitcode. |
| 50 bool GetProgramURL(nacl::string* full_url, | 50 bool GetProgramURL(nacl::string* full_url, |
| 51 ErrorInfo* error_info, | 51 ErrorInfo* error_info, |
| 52 bool* is_portable); | 52 bool* is_portable); |
| 53 | 53 |
| 54 // TODO(jvoung): Get rid of these when we find a better way to | |
| 55 // store / install these. | |
| 56 // Gets the full nexe URL for the LLC nexe from the manifest file. | |
| 57 bool GetLLCURL(nacl::string* full_url, ErrorInfo* error_info); | |
| 58 | |
| 59 // Gets the full nexe URL for the LD nexe from the manifest file. | |
| 60 bool GetLDURL(nacl::string* full_url, ErrorInfo* error_info); | |
| 61 // end TODO(jvoung) | |
| 62 | |
| 63 // Resolves a URL relative to the manifest base URL | 54 // Resolves a URL relative to the manifest base URL |
| 64 bool ResolveURL(const nacl::string& relative_url, | 55 bool ResolveURL(const nacl::string& relative_url, |
| 65 nacl::string* full_url, | 56 nacl::string* full_url, |
| 66 ErrorInfo* error_info) const; | 57 ErrorInfo* error_info) const; |
| 67 | 58 |
| 68 // Gets the file names from the "files" section of the manifest. No | 59 // Gets the file names from the "files" section of the manifest. No |
| 69 // checking that the keys' values are proper ISA dictionaries -- it | 60 // checking that the keys' values are proper ISA dictionaries -- it |
| 70 // is assumed that other consistency checks take care of that, and | 61 // is assumed that other consistency checks take care of that, and |
| 71 // that the keys are appropriate for use with ResolveKey. | 62 // that the keys are appropriate for use with ResolveKey. |
| 72 bool GetFileKeys(std::set<nacl::string>* keys) const; | 63 bool GetFileKeys(std::set<nacl::string>* keys) const; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 93 // if not. | 84 // if not. |
| 94 bool MatchesSchema(ErrorInfo* error_info); | 85 bool MatchesSchema(ErrorInfo* error_info); |
| 95 | 86 |
| 96 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); | 87 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); |
| 97 }; | 88 }; |
| 98 | 89 |
| 99 | 90 |
| 100 } // namespace plugin | 91 } // namespace plugin |
| 101 | 92 |
| 102 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 93 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
| OLD | NEW |