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

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

Issue 9355051: Plumb through cache_identity from manifest for first sketch of pnacl cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix type-check thing found by windows compiler. Created 8 years, 10 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 c62c64a8498da3516b262bbca65a9fbb712c4046..0034f26d571d2b92b5fbee34aa0962f9f4276592 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -1471,6 +1471,7 @@ 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;
ErrorInfo error_info;
if (!SetManifestObject(manifest_json, &error_info)) {
@@ -1478,7 +1479,8 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) {
return;
}
- if (SelectProgramURLFromManifest(&program_url, &error_info, &is_portable)) {
+ if (manifest_->GetProgramURL(&program_url, &cache_identity,
+ &error_info, &is_portable)) {
set_nacl_ready_state(LOADING);
// Inform JavaScript that we found a nexe URL to load.
EnqueueProgressEvent(kProgressEventProgress);
@@ -1489,6 +1491,7 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) {
pnacl_coordinator_.reset(
PnaclCoordinator::BitcodeToNative(this,
program_url,
+ cache_identity,
translate_callback));
return;
} else {
@@ -1575,17 +1578,6 @@ bool Plugin::SetManifestObject(const nacl::string& manifest_json,
return true;
}
-bool Plugin::SelectProgramURLFromManifest(nacl::string* result,
- ErrorInfo* error_info,
- bool* is_portable) {
- const nacl::string sandbox_isa(GetSandboxISA());
- PLUGIN_PRINTF(("Plugin::SelectProgramURLFromManifest(): sandbox='%s'.\n",
- sandbox_isa.c_str()));
- if (result == NULL || error_info == NULL || manifest_ == NULL)
- return false;
- return manifest_->GetProgramURL(result, error_info, is_portable);
-}
-
void Plugin::UrlDidOpenForStreamAsFile(int32_t pp_error,
FileDownloader*& url_downloader,
PP_CompletionCallback callback) {
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.h ('k') | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698