| Index: ppapi/native_client/src/trusted/plugin/service_runtime.cc
|
| diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
|
| index ea7c2624422fd900fda63823c9134838444e1636..00f64c767f6a178878b54eb5f95f40076d8f65af 100644
|
| --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc
|
| +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
|
| @@ -259,9 +259,9 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
|
| NaClLog(4, "Entered OpenManifestEntry_MainThreadContinuation\n");
|
|
|
| std::string mapped_url;
|
| - std::string cache_identity;
|
| - if (!manifest_->ResolveKey(p->url, &mapped_url, &cache_identity,
|
| - p->error_info, &p->pnacl_translate)) {
|
| + PnaclOptions pnacl_options;
|
| + if (!manifest_->ResolveKey(p->url, &mapped_url,
|
| + &pnacl_options, p->error_info)) {
|
| NaClLog(4, "OpenManifestEntry_MainThreadContinuation: ResolveKey failed\n");
|
| // Failed, and error_info has the details on what happened. Wake
|
| // up requesting thread -- we are done.
|
| @@ -274,18 +274,18 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
|
| NaClLog(4,
|
| "OpenManifestEntry_MainThreadContinuation: "
|
| "ResolveKey: %s -> %s (pnacl_translate(%d))\n",
|
| - p->url.c_str(), mapped_url.c_str(), p->pnacl_translate);
|
| + p->url.c_str(), mapped_url.c_str(), pnacl_options.translate());
|
|
|
| open_cont = new OpenManifestEntryResource(*p); // copy ctor!
|
| CHECK(open_cont != NULL);
|
| open_cont->url = mapped_url;
|
| - if (!open_cont->pnacl_translate) {
|
| + if (!pnacl_options.translate()) {
|
| pp::CompletionCallback stream_cc = WeakRefNewCallback(
|
| anchor_,
|
| this,
|
| &PluginReverseInterface::StreamAsFile_MainThreadContinuation,
|
| open_cont);
|
| - //
|
| + // Normal files.
|
| if (!PnaclUrls::IsPnaclComponent(mapped_url)) {
|
| if (!plugin_->StreamAsFile(mapped_url,
|
| stream_cc.pp_completion_callback())) {
|
| @@ -303,6 +303,8 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
|
| NaClLog(4,
|
| "OpenManifestEntry_MainThreadContinuation: StreamAsFile okay\n");
|
| } else {
|
| + // Special PNaCl support files, that are installed on the
|
| + // user machine.
|
| int32_t fd = PnaclResources::GetPnaclFD(
|
| plugin_,
|
| PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str());
|
| @@ -325,6 +327,7 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
|
| "OpenManifestEntry_MainThreadContinuation: GetPnaclFd okay\n");
|
| }
|
| } else {
|
| + // Requires PNaCl translation.
|
| NaClLog(4,
|
| "OpenManifestEntry_MainThreadContinuation: "
|
| "pulling down and translating.\n");
|
| @@ -339,7 +342,7 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
|
| pnacl_coordinator_.reset(
|
| PnaclCoordinator::BitcodeToNative(plugin_,
|
| mapped_url,
|
| - cache_identity,
|
| + pnacl_options,
|
| translate_callback));
|
| } else {
|
| nacl::MutexLocker take(&mu_);
|
|
|