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..43b5dd53e2942b4f1a072296f8250426d71355ba 100644 |
--- a/components/nacl/renderer/json_manifest.cc |
+++ b/components/nacl/renderer/json_manifest.cc |
@@ -470,31 +470,18 @@ bool JsonManifest::ResolveKey(const std::string& key, |
if (key == kProgramKey) |
Mark Seaborn
2015/04/16 18:47:47
Doesn't this case need to be removed now?
Otherwi
Yusuke Sato
2015/04/16 20:37:20
Done.
|
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? |
Mark Seaborn
2015/04/16 18:47:47
You can remove this since comment it's clear we do
Yusuke Sato
2015/04/16 20:37:20
Done.
|
- 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) { |