| Index: components/nacl/renderer/json_manifest.cc
|
| diff --git a/components/nacl/renderer/json_manifest.cc b/components/nacl/renderer/json_manifest.cc
|
| index e2063acd1d6c87a826917db7b7f78845827341cf..64676a123a799d2841789763a1f714c9d23c4333 100644
|
| --- a/components/nacl/renderer/json_manifest.cc
|
| +++ b/components/nacl/renderer/json_manifest.cc
|
| @@ -459,6 +459,28 @@ bool JsonManifest::GetProgramURL(std::string* full_url,
|
| return true;
|
| }
|
|
|
| +bool JsonManifest::GetFiles(
|
| + std::vector<std::pair<std::string, std::string> >* out_files) const {
|
| + if (out_files == NULL)
|
| + return false;
|
| +
|
| + const Json::Value& files = dictionary_[kFilesKey];
|
| + if (!files.isObject()) {
|
| + VLOG(1) << "ResolveKey failed: no \"files\" dictionary";
|
| + return false;
|
| + }
|
| +
|
| + const std::vector<std::string>& keys = files.getMemberNames();
|
| + for (size_t i = 0; i < keys.size(); ++i) {
|
| + std::string full_url;
|
| + PP_PNaClOptions pnacl_options;
|
| + if (!GetKeyUrl(files, keys[i], &full_url, &pnacl_options))
|
| + return false;
|
| + out_files->push_back(std::make_pair(full_url, keys[i]));
|
| + }
|
| + return true;
|
| +}
|
| +
|
| bool JsonManifest::ResolveKey(const std::string& key,
|
| std::string* full_url,
|
| PP_PNaClOptions* pnacl_options) const {
|
|
|