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 interface class. | 7 // Manifest interface 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 29 matching lines...) Expand all Loading... |
40 // Gets the full program URL for the current sandbox ISA from the | 40 // Gets the full program URL for the current sandbox ISA from the |
41 // manifest file. Sets |is_portable| to |true| if the program is | 41 // manifest file. Sets |is_portable| to |true| if the program is |
42 // portable bitcode. | 42 // portable bitcode. |
43 virtual bool GetProgramURL(nacl::string* full_url, | 43 virtual bool GetProgramURL(nacl::string* full_url, |
44 ErrorInfo* error_info, | 44 ErrorInfo* error_info, |
45 bool* is_portable) const = 0; | 45 bool* is_portable) const = 0; |
46 | 46 |
47 // Resolves a URL relative to the manifest base URL | 47 // Resolves a URL relative to the manifest base URL |
48 virtual bool ResolveURL(const nacl::string& relative_url, | 48 virtual bool ResolveURL(const nacl::string& relative_url, |
49 nacl::string* full_url, | 49 nacl::string* full_url, |
50 bool* permit_extension_url, | |
51 ErrorInfo* error_info) const = 0; | 50 ErrorInfo* error_info) const = 0; |
52 | 51 |
53 // Gets the file names from the "files" section of the manifest. No | 52 // Gets the file names from the "files" section of the manifest. No |
54 // checking that the keys' values are proper ISA dictionaries -- it | 53 // checking that the keys' values are proper ISA dictionaries -- it |
55 // is assumed that other consistency checks take care of that, and | 54 // is assumed that other consistency checks take care of that, and |
56 // that the keys are appropriate for use with ResolveKey. | 55 // that the keys are appropriate for use with ResolveKey. |
57 virtual bool GetFileKeys(std::set<nacl::string>* keys) const = 0; | 56 virtual bool GetFileKeys(std::set<nacl::string>* keys) const = 0; |
58 | 57 |
59 // Resolves a key from the "files" section to a fully resolved URL, | 58 // Resolves a key from the "files" section to a fully resolved URL, |
60 // i.e., relative URL values are fully expanded relative to the | 59 // i.e., relative URL values are fully expanded relative to the |
61 // manifest's URL (via ResolveURL). If there was an error, details | 60 // manifest's URL (via ResolveURL). If there was an error, details |
62 // are reported via error_info, and is_portable, if non-NULL, tells | 61 // are reported via error_info, and is_portable, if non-NULL, tells |
63 // the caller whether the resolution used the portable | 62 // the caller whether the resolution used the portable |
64 // representation or an ISA-specific version of the file. | 63 // representation or an ISA-specific version of the file. |
65 virtual bool ResolveKey(const nacl::string& key, | 64 virtual bool ResolveKey(const nacl::string& key, |
66 nacl::string* full_url, | 65 nacl::string* full_url, |
67 bool* permit_extension_url, | |
68 ErrorInfo* error_info, | 66 ErrorInfo* error_info, |
69 bool* is_portable) const = 0; | 67 bool* is_portable) const = 0; |
70 | 68 |
71 protected: | 69 protected: |
72 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); | 70 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); |
73 }; | 71 }; |
74 | 72 |
75 | 73 |
76 } // namespace plugin | 74 } // namespace plugin |
77 | 75 |
78 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 76 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
OLD | NEW |