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

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 12623004: Allow PNaCl NMF to set translator optimization options for experimentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Default to -O0 instead of the default for now Created 7 years, 9 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
Index: ppapi/native_client/src/trusted/plugin/plugin.cc
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index 90c5644243966e6b8e725e31900c4f9a1a55a4d2..e1f3ad939c7023e3cd91f7c50f441317af9d51cc 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -1174,21 +1174,19 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) {
HistogramSizeKB("NaCl.Perf.Size.Manifest",
static_cast<int32_t>(manifest_json.length() / 1024));
nacl::string program_url;
- nacl::string cache_identity;
- bool is_portable;
+ PnaclOptions pnacl_options;
ErrorInfo error_info;
if (!SetManifestObject(manifest_json, &error_info)) {
ReportLoadError(error_info);
return;
}
- if (manifest_->GetProgramURL(&program_url, &cache_identity,
- &error_info, &is_portable)) {
+ if (manifest_->GetProgramURL(&program_url, &pnacl_options, &error_info)) {
is_installed_ = GetUrlScheme(program_url) == SCHEME_CHROME_EXTENSION;
set_nacl_ready_state(LOADING);
// Inform JavaScript that we found a nexe URL to load.
EnqueueProgressEvent(kProgressEventProgress);
- if (is_portable) {
+ if (pnacl_options.translate()) {
if (this->nacl_interface()->IsPnaclEnabled()) {
pp::CompletionCallback translate_callback =
callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate);
@@ -1196,7 +1194,7 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) {
pnacl_coordinator_.reset(
PnaclCoordinator::BitcodeToNative(this,
program_url,
- cache_identity,
+ pnacl_options,
translate_callback));
return;
} else {
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/manifest.h ('k') | ppapi/native_client/src/trusted/plugin/plugin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698