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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // i.e., relative URL values are fully expanded relative to the | 62 // i.e., relative URL values are fully expanded relative to the |
63 // manifest's URL (via ResolveURL). If there was an error, details | 63 // manifest's URL (via ResolveURL). If there was an error, details |
64 // are reported via error_info, and is_portable, if non-NULL, tells | 64 // are reported via error_info, and is_portable, if non-NULL, tells |
65 // the caller whether the resolution used the portable | 65 // the caller whether the resolution used the portable |
66 // representation or an ISA-specific version of the file. | 66 // representation or an ISA-specific version of the file. |
67 virtual bool ResolveKey(const nacl::string& key, | 67 virtual bool ResolveKey(const nacl::string& key, |
68 nacl::string* full_url, | 68 nacl::string* full_url, |
69 ErrorInfo* error_info, | 69 ErrorInfo* error_info, |
70 bool* is_portable) const; | 70 bool* is_portable) const; |
71 | 71 |
| 72 // A JSON manifest does not allow access to extension URLs. |
| 73 virtual bool PermitsExtensionUrls() const { return false; } |
72 | 74 |
73 private: | 75 private: |
74 NACL_DISALLOW_COPY_AND_ASSIGN(JsonManifest); | 76 NACL_DISALLOW_COPY_AND_ASSIGN(JsonManifest); |
75 | 77 |
76 // Checks that |dictionary_| is a valid manifest, according to the schema. | 78 // Checks that |dictionary_| is a valid manifest, according to the schema. |
77 // Returns true on success, and sets |error_info| to a detailed message | 79 // Returns true on success, and sets |error_info| to a detailed message |
78 // if not. | 80 // if not. |
79 bool MatchesSchema(ErrorInfo* error_info); | 81 bool MatchesSchema(ErrorInfo* error_info); |
80 | 82 |
81 Json::Value dictionary_; | 83 Json::Value dictionary_; |
82 }; | 84 }; |
83 | 85 |
84 | 86 |
85 } // namespace plugin | 87 } // namespace plugin |
86 | 88 |
87 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ | 89 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_JSON_MANIFEST_H_ |
OLD | NEW |