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

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

Issue 15697019: Parametrize names of llc and ld nexes by reading them from the resource info JSON file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win build Created 7 years, 7 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/pnacl_coordinator.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
index a938b77243ea1247538eb127b1f46ec092270f1c..d1855ca8fe8e37527fbd92bb0493c786e92c08c8 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -92,7 +92,8 @@ class PnaclManifest : public Manifest {
}
// Append what follows files to the pnacl URL prefix.
jvoung (off chromium) 2013/05/23 20:33:19 also comment that this now adds the expected archi
eliben 2013/05/23 20:54:25 Done.
nacl::string key_basename = key.substr(kFilesPrefix.length());
- return ResolveURL(key_basename, full_url, error_info);
+ return ResolveURL(PnaclUrls::PrependPlatformPrefix(key_basename),
+ full_url, error_info);
}
private:
@@ -238,21 +239,18 @@ PnaclCoordinator* PnaclCoordinator::BitcodeToNative(
coordinator->off_the_record_));
// Load llc and ld.
jvoung (off chromium) 2013/05/23 20:33:19 remove comment about llc and ld, or somehow incorp
eliben 2013/05/23 20:54:25 Changed comment, and also added below.
- std::vector<nacl::string> resource_urls;
- resource_urls.push_back(PnaclUrls::GetLlcUrl());
- resource_urls.push_back(PnaclUrls::GetLdUrl());
- pp::CompletionCallback resources_cb =
- coordinator->callback_factory_.NewCallback(
- &PnaclCoordinator::ResourcesDidLoad);
coordinator->resources_.reset(
new PnaclResources(plugin,
coordinator,
- coordinator->manifest_.get(),
- resource_urls,
- resources_cb));
+ coordinator->manifest_.get()));
CHECK(coordinator->resources_ != NULL);
- coordinator->resources_->StartLoad();
- // ResourcesDidLoad will be invoked when all resources have been received.
+
+ // The first step of loading resources: read the resource info file.
+ pp::CompletionCallback resource_info_read_cb =
+ coordinator->callback_factory_.NewCallback(
+ &PnaclCoordinator::ResourceInfoWasRead);
+ coordinator->resources_->ReadResourceInfo(PnaclUrls::GetResourceInfoUrl(),
+ resource_info_read_cb);
return coordinator;
}
@@ -649,6 +647,14 @@ void PnaclCoordinator::NexeReadDidOpen(int32_t pp_error) {
translate_notify_callback_.Run(pp_error);
}
+void PnaclCoordinator::ResourceInfoWasRead(int32_t pp_error) {
+ PLUGIN_PRINTF(("PluginCoordinator::ResourceInfoWasRead (pp_error=%"
+ NACL_PRId32")\n", pp_error));
+ pp::CompletionCallback resources_cb =
+ callback_factory_.NewCallback(&PnaclCoordinator::ResourcesDidLoad);
+ resources_->StartLoad(resources_cb);
+}
+
void PnaclCoordinator::ResourcesDidLoad(int32_t pp_error) {
PLUGIN_PRINTF(("PnaclCoordinator::ResourcesDidLoad (pp_error=%"
NACL_PRId32")\n", pp_error));

Powered by Google App Engine
This is Rietveld 408576698