Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: components/nacl/renderer/json_manifest.cc

Issue 1070233007: Stop adding the "files/" prefix when sending open_resource IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698