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

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

Issue 10689012: Add ability to load pnacl resources from DIR_PNACL_COMPONENT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PP_FileHandle Created 8 years, 4 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 3377b6a6d9918f6cade2f163636d0530aa0d2336..86315b3fc3e1e43d33b43ba1e8d21ae3e24e5138 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -33,12 +33,18 @@ namespace plugin {
//////////////////////////////////////////////////////////////////////
// Pnacl-specific manifest support.
//////////////////////////////////////////////////////////////////////
-class ExtensionManifest : public Manifest {
+
+class PnaclManifest : public Manifest {
public:
- explicit ExtensionManifest(const pp::URLUtil_Dev* url_util)
+ explicit PnaclManifest(const pp::URLUtil_Dev* url_util,
robertm 2012/08/08 21:51:11 now that the constructor has a second arg the "exp
jvoung - send to chromium... 2012/08/08 22:47:04 Done.
+ bool use_extension)
: url_util_(url_util),
- manifest_base_url_(PnaclUrls::GetExtensionUrl()) { }
- virtual ~ExtensionManifest() { }
+ manifest_base_url_(PnaclUrls::GetBaseUrl(use_extension)) {
+ // TODO(jvoung): get rid of use_extension when we no longer rely
+ // on the chrome webstore extension. Most of this Manifest stuff
+ // can also be simplified then.
+ }
+ virtual ~PnaclManifest() { }
virtual bool GetProgramURL(nacl::string* full_url,
nacl::string* cache_identity,
@@ -49,7 +55,7 @@ class ExtensionManifest : public Manifest {
UNREFERENCED_PARAMETER(cache_identity);
UNREFERENCED_PARAMETER(error_info);
UNREFERENCED_PARAMETER(pnacl_translate);
- PLUGIN_PRINTF(("ExtensionManifest does not contain a program\n"));
+ PLUGIN_PRINTF(("PnaclManifest does not contain a program\n"));
error_info->SetReport(ERROR_MANIFEST_GET_NEXE_URL,
"pnacl manifest does not contain a program.");
return false;
@@ -67,7 +73,7 @@ class ExtensionManifest : public Manifest {
virtual bool GetFileKeys(std::set<nacl::string>* keys) const {
// Does not support enumeration.
- PLUGIN_PRINTF(("ExtensionManifest does not support key enumeration\n"));
+ PLUGIN_PRINTF(("PnaclManifest does not support key enumeration\n"));
UNREFERENCED_PARAMETER(keys);
return false;
}
@@ -95,7 +101,7 @@ class ExtensionManifest : public Manifest {
}
private:
- NACL_DISALLOW_COPY_AND_ASSIGN(ExtensionManifest);
+ NACL_DISALLOW_COPY_AND_ASSIGN(PnaclManifest);
const pp::URLUtil_Dev* url_util_;
nacl::string manifest_base_url_;
@@ -205,7 +211,7 @@ PnaclCoordinator* PnaclCoordinator::BitcodeToNative(
resource_urls,
resources_cb));
CHECK(coordinator->resources_ != NULL);
- coordinator->resources_->StartDownloads();
+ coordinator->resources_->StartLoad();
// ResourcesDidLoad will be invoked when all resources have been received.
return coordinator;
}
@@ -238,7 +244,9 @@ PnaclCoordinator::PnaclCoordinator(
plugin_(plugin),
translate_notify_callback_(translate_notify_callback),
file_system_(new pp::FileSystem(plugin, PP_FILESYSTEMTYPE_LOCALTEMPORARY)),
- manifest_(new ExtensionManifest(plugin->url_util())),
+ manifest_(new PnaclManifest(
+ plugin->url_util(),
+ plugin::PnaclUrls::UsePnaclExtension(plugin))),
pexe_url_(pexe_url),
cache_identity_(cache_identity),
error_already_reported_(false),

Powered by Google App Engine
This is Rietveld 408576698