Commit 9e7d2376 authored by teravest@chromium.org's avatar teravest@chromium.org

Trusted plugin: Remove EnumerateManifestKeys.

This function was removed from ReverseService inside "native_client/", as it's
no longer necessary. This change removes an implementation that's never called,
and simplifies the Manifest logic, making it easier to move that out of the
trusted plugin.

BUG=239656
R=dmichael@chromium.org

Review URL: https://codereview.chromium.org/258083004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266938 0039d316-1c4b-4281-b951-d872f2087c98
parent 1124dea0
......@@ -609,20 +609,6 @@ bool JsonManifest::GetProgramURL(nacl::string* full_url,
return ResolveURL(nexe_url, full_url, error_info);
}
bool JsonManifest::GetFileKeys(std::set<nacl::string>* keys) const {
if (!dictionary_.isMember(kFilesKey)) {
// trivial success: no keys when there is no "files" section.
return true;
}
const Json::Value& files = dictionary_[kFilesKey];
CHECK(files.isObject());
Json::Value::Members members = files.getMemberNames();
for (size_t i = 0; i < members.size(); ++i) {
keys->insert(members[i]);
}
return true;
}
bool JsonManifest::ResolveKey(const nacl::string& key,
nacl::string* full_url,
PP_PNaClOptions* pnacl_options,
......
......@@ -54,12 +54,6 @@ class JsonManifest : public Manifest {
bool* uses_nonsfi_mode,
ErrorInfo* error_info) const;
// Gets the file names from the "files" section of the manifest. No
// checking that the keys' values are proper ISA dictionaries -- it
// is assumed that other consistency checks take care of that, and
// that the keys are appropriate for use with ResolveKey.
virtual bool GetFileKeys(std::set<nacl::string>* keys) const;
// Resolves a key from the "files" section to a fully resolved URL,
// i.e., relative URL values are fully expanded relative to the
// manifest's URL (via ResolveURL).
......
......@@ -47,12 +47,6 @@ class Manifest {
bool* uses_nonsfi_mode,
ErrorInfo* error_info) const = 0;
// Gets the file names from the "files" section of the manifest. No
// checking that the keys' values are proper ISA dictionaries -- it
// is assumed that other consistency checks take care of that, and
// that the keys are appropriate for use with ResolveKey.
virtual bool GetFileKeys(std::set<nacl::string>* keys) const = 0;
// Resolves a key from the "files" section to a fully resolved URL,
// i.e., relative URL values are fully expanded relative to the
// manifest's URL. Fills in |pnacl_options| if
......
......@@ -56,13 +56,6 @@ class PnaclManifest : public Manifest {
return false;
}
virtual bool GetFileKeys(std::set<nacl::string>* keys) const {
// Does not support enumeration.
PLUGIN_PRINTF(("PnaclManifest does not support key enumeration\n"));
UNREFERENCED_PARAMETER(keys);
return false;
}
virtual bool ResolveKey(const nacl::string& key,
nacl::string* full_url,
PP_PNaClOptions* pnacl_options,
......
......@@ -184,11 +184,6 @@ void PluginReverseInterface::PostMessage_MainThreadContinuation(
plugin_->PostMessage(std::string("DEBUG_POSTMESSAGE:") + p->message);
}
bool PluginReverseInterface::EnumerateManifestKeys(
std::set<nacl::string>* out_keys) {
return manifest_->GetFileKeys(out_keys);
}
// TODO(bsy): OpenManifestEntry should use the manifest to ResolveKey
// and invoke StreamAsFile with a completion callback that invokes
// GetPOSIXFileDesc.
......
......@@ -153,8 +153,6 @@ class PluginReverseInterface: public nacl::ReverseInterface {
virtual void StartupInitializationComplete();
virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys);
virtual bool OpenManifestEntry(nacl::string url_key,
struct NaClFileInfo *info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment