Chromium Code Reviews| Index: components/nacl/renderer/json_manifest.cc |
| diff --git a/components/nacl/renderer/json_manifest.cc b/components/nacl/renderer/json_manifest.cc |
| index 951894679760a82f6db2cf8f0afe7de9da57bbce..347efdffd18b3232d8ba9577de74cbb78d1d1ec6 100644 |
| --- a/components/nacl/renderer/json_manifest.cc |
| +++ b/components/nacl/renderer/json_manifest.cc |
| @@ -442,6 +442,24 @@ bool JsonManifest::GetProgramURL(std::string* full_url, |
| return true; |
| } |
| +void JsonManifest::GetPrefetchableFiles( |
| + std::vector<std::pair<std::string, std::string> >* out_files) const { |
| + const Json::Value& files = dictionary_[kFilesKey]; |
| + if (!files.isObject()) |
| + return; |
| + |
| + const std::vector<std::string>& keys = files.getMemberNames(); |
|
Mark Seaborn
2015/02/25 20:01:24
The other callers of getMemberNames() in this file
Yusuke Sato
2015/03/01 06:59:37
Done.
|
| + for (size_t i = 0; i < keys.size(); ++i) { |
| + std::string full_url; |
| + PP_PNaClOptions unused_pnacl_options; // pnacl does not support "files". |
| + // We skip invalid entries in "files". |
| + if (GetKeyUrl(files, keys[i], &full_url, &unused_pnacl_options)) { |
| + if (GURL(full_url).SchemeIs("chrome-extension")) |
| + out_files->push_back(std::make_pair(full_url, keys[i])); |
| + } |
| + } |
| +} |
| + |
| bool JsonManifest::ResolveKey(const std::string& key, |
| std::string* full_url, |
| PP_PNaClOptions* pnacl_options) const { |