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

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

Issue 9159037: Use CORS for fetching NaCl resources from extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add webkit bug# Created 8 years, 11 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 ecea98bf80eb9ae85bb9ac2c92b0c6112ff99c07..f68184ea2ad12783b24ea7686f0b03c7640a1b1f 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -198,16 +198,11 @@ class ExtensionManifest : public Manifest {
virtual bool ResolveURL(const nacl::string& relative_url,
nacl::string* full_url,
- bool* permit_extension_url,
ErrorInfo* error_info) const {
// Does not do general URL resolution, simply appends relative_url to
// the end of manifest_base_url_.
UNREFERENCED_PARAMETER(error_info);
*full_url = manifest_base_url_ + relative_url;
- // Since the pnacl coordinator manifest provides access to resources
- // in the chrome extension, lookups will need to access resources in their
- // extension origin rather than the plugin's origin.
- *permit_extension_url = true;
return true;
}
@@ -220,7 +215,6 @@ class ExtensionManifest : public Manifest {
virtual bool ResolveKey(const nacl::string& key,
nacl::string* full_url,
- bool* permit_extension_url,
ErrorInfo* error_info,
bool* is_portable) const {
*is_portable = false;
@@ -234,7 +228,7 @@ class ExtensionManifest : public Manifest {
}
// Append what follows files to the pnacl URL prefix.
nacl::string key_basename = key.substr(kFilesPrefix.length());
- return ResolveURL(key_basename, full_url, permit_extension_url, error_info);
+ return ResolveURL(key_basename, full_url, error_info);
}
private:
@@ -272,14 +266,11 @@ class PnaclLDManifest : public Manifest {
virtual bool ResolveURL(const nacl::string& relative_url,
nacl::string* full_url,
- bool* permit_extension_url,
ErrorInfo* error_info) const {
- if (nexe_manifest_->ResolveURL(relative_url, full_url,
- permit_extension_url, error_info)) {
+ if (nexe_manifest_->ResolveURL(relative_url, full_url, error_info)) {
return true;
}
- return extension_manifest_->ResolveURL(relative_url, full_url,
- permit_extension_url, error_info);
+ return extension_manifest_->ResolveURL(relative_url, full_url, error_info);
}
virtual bool GetFileKeys(std::set<nacl::string>* keys) const {
@@ -291,14 +282,12 @@ class PnaclLDManifest : public Manifest {
virtual bool ResolveKey(const nacl::string& key,
nacl::string* full_url,
- bool* permit_extension_url,
ErrorInfo* error_info,
bool* is_portable) const {
- if (nexe_manifest_->ResolveKey(key, full_url, permit_extension_url,
- error_info, is_portable)) {
+ if (nexe_manifest_->ResolveKey(key, full_url, error_info, is_portable)) {
return true;
}
- return extension_manifest_->ResolveKey(key, full_url, permit_extension_url,
+ return extension_manifest_->ResolveKey(key, full_url,
error_info, is_portable);
}
@@ -510,8 +499,7 @@ void PnaclCoordinator::NexePairDidOpen(int32_t pp_error) {
pp::CompletionCallback cb =
callback_factory_.NewCallback(&PnaclCoordinator::RunTranslate);
- // "false" here indicates the pexe must be in user's manifest file origin.
- if (!plugin_->StreamAsFile(pexe_url_, false, cb.pp_completion_callback())) {
+ if (!plugin_->StreamAsFile(pexe_url_, cb.pp_completion_callback())) {
ReportNonPpapiError(nacl::string("failed to download ") + pexe_url_ + ".");
}
}
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.cc ('k') | ppapi/native_client/src/trusted/plugin/pnacl_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698