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 15425a531e514a2a27a08cf476465aadc1432dea..56a4b2a2352cd36f138de148484a52095b865817 100644 |
| --- a/components/nacl/renderer/json_manifest.cc |
| +++ b/components/nacl/renderer/json_manifest.cc |
| @@ -463,38 +463,20 @@ void JsonManifest::GetPrefetchableFiles( |
| bool JsonManifest::ResolveKey(const std::string& key, |
| std::string* full_url, |
| PP_PNaClOptions* pnacl_options) const { |
| - // key must be one of kProgramKey or kFileKey '/' file-section-key |
| if (full_url == NULL || pnacl_options == NULL) |
| return false; |
| - if (key == kProgramKey) |
|
Mark Seaborn
2015/04/16 20:45:14
In the commit message, can you comment that kProgr
|
| - return GetKeyUrl(dictionary_, key, full_url, pnacl_options); |
| - |
| - std::string::const_iterator p = std::find(key.begin(), key.end(), '/'); |
| - if (p == key.end()) { |
| - VLOG(1) << "ResolveKey failed: invalid key, no slash: " << key; |
| - return false; |
| - } |
| - |
| - // generalize to permit other sections? |
| - std::string prefix(key.begin(), p); |
| - if (prefix != kFilesKey) { |
| - VLOG(1) << "ResolveKey failed: invalid key, no \"files\" prefix: " << key; |
| - return false; |
| - } |
| - |
| const Json::Value& files = dictionary_[kFilesKey]; |
| if (!files.isObject()) { |
| VLOG(1) << "ResolveKey failed: no \"files\" dictionary"; |
| return false; |
| } |
| - std::string rest(p + 1, key.end()); |
| - if (!files.isMember(rest)) { |
| + if (!files.isMember(key)) { |
| VLOG(1) << "ResolveKey failed: no such \"files\" entry: " << key; |
| return false; |
| } |
| - return GetKeyUrl(files, rest, full_url, pnacl_options); |
| + return GetKeyUrl(files, key, full_url, pnacl_options); |
| } |
| bool JsonManifest::MatchesSchema(ErrorInfo* error_info) { |