summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 19:55:37 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 19:55:37 +0000
commit4a3c6441d90027e843682fca57be39a9423a2c8c (patch)
tree46c49db7a2cc447d1a75f016e4e6740699319584 /ppapi
parent9c193c4f101c0cd4131c4eccbc1ecfdf9a000abc (diff)
downloadchromium_src-4a3c6441d90027e843682fca57be39a9423a2c8c.zip
chromium_src-4a3c6441d90027e843682fca57be39a9423a2c8c.tar.gz
chromium_src-4a3c6441d90027e843682fca57be39a9423a2c8c.tar.bz2
Pepper: Remove PPB_NaCl_Private GetUrlScheme().
This is part of a larger effort to get rid of the trusted plugin (code under ppapi/native_client/src/trusted/plugin). This pulls more code into the renderer while preserving the current behavior. BUG=239656 R=dmichael@chromium.org Review URL: https://codereview.chromium.org/259073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/private/ppb_nacl_private.idl3
-rw-r--r--ppapi/c/private/ppb_nacl_private.h4
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.cc17
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.h2
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c6
5 files changed, 1 insertions, 31 deletions
diff --git a/ppapi/api/private/ppb_nacl_private.idl b/ppapi/api/private/ppb_nacl_private.idl
index db21501..d38f5c5 100644
--- a/ppapi/api/private/ppb_nacl_private.idl
+++ b/ppapi/api/private/ppb_nacl_private.idl
@@ -337,9 +337,6 @@ interface PPB_NaCl_Private {
*/
str_t GetSandboxArch();
- /* Returns the scheme type for a given url. */
- PP_UrlSchemeType GetUrlScheme([in] PP_Var url);
-
/* Logs the message to the console. */
void LogToConsole([in] PP_Instance instance,
[in] str_t message);
diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h
index 644cabd..11e57c3 100644
--- a/ppapi/c/private/ppb_nacl_private.h
+++ b/ppapi/c/private/ppb_nacl_private.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/ppb_nacl_private.idl modified Wed Apr 23 12:20:47 2014. */
+/* From private/ppb_nacl_private.idl modified Fri Apr 25 15:10:15 2014. */
#ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
@@ -346,8 +346,6 @@ struct PPB_NaCl_Private_1_0 {
* platform.
*/
const char* (*GetSandboxArch)(void);
- /* Returns the scheme type for a given url. */
- PP_UrlSchemeType (*GetUrlScheme)(struct PP_Var url);
/* Logs the message to the console. */
void (*LogToConsole)(PP_Instance instance, const char* message);
/* Returns the NaCl readiness status for this instance. */
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index c2fcbd8..986f6d7 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -123,10 +123,6 @@ void Plugin::HistogramEnumerateSelLdrLoadStatus(NaClErrorCode error_code) {
LOAD_STATUS_UNKNOWN);
}
-void Plugin::HistogramEnumerateManifestIsDataURI(bool is_data_uri) {
- HistogramEnumerate("NaCl.Manifest.IsDataURI", is_data_uri, 2, -1);
-}
-
void Plugin::HistogramHTTPStatusCode(const std::string& name, int status) {
// Log the status codes in rough buckets - 1XX, 2XX, etc.
int sample = status / 100;
@@ -712,7 +708,6 @@ void Plugin::RequestNaClManifest(const nacl::string& url) {
"manifest file too large.");
ReportLoadError(error_info);
} else {
- // TODO(teravest): Does this have to be async for any reason?
ProcessNaClManifest(nmf_data.AsString());
}
} else {
@@ -932,18 +927,6 @@ void Plugin::EnqueueProgressEvent(PP_NaClEventType event_type,
bool Plugin::OpenURLFast(const nacl::string& url,
FileDownloader* downloader) {
- // Fast path only works for installed file URLs.
- pp::Var url_var(url);
- if (nacl_interface_->GetUrlScheme(url_var.pp_var()) !=
- PP_SCHEME_CHROME_EXTENSION)
- return false;
- // IMPORTANT: Make sure the document can request the given URL. If we don't
- // check, a malicious app could probe the extension system. This enforces a
- // same-origin policy which prevents the app from requesting resources from
- // another app.
- if (!DocumentCanRequest(url))
- return false;
-
uint64_t file_token_lo = 0;
uint64_t file_token_hi = 0;
PP_FileHandle file_handle =
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.h b/ppapi/native_client/src/trusted/plugin/plugin.h
index 717812a..2e1c779 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.h
+++ b/ppapi/native_client/src/trusted/plugin/plugin.h
@@ -197,10 +197,8 @@ class Plugin : public pp::Instance {
int sample,
int maximum,
int out_of_range_replacement);
- void HistogramEnumerateOsArch(const std::string& sandbox_isa);
void HistogramEnumerateLoadStatus(PP_NaClError error_code);
void HistogramEnumerateSelLdrLoadStatus(NaClErrorCode error_code);
- void HistogramEnumerateManifestIsDataURI(bool is_data_uri);
void HistogramHTTPStatusCode(const std::string& name, int status);
// Load a nacl module from the file specified in wrapper.
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index 8569c99..477169a 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -3199,11 +3199,6 @@ static const char* Pnacl_M25_PPB_NaCl_Private_GetSandboxArch(void) {
return iface->GetSandboxArch();
}
-static PP_UrlSchemeType Pnacl_M25_PPB_NaCl_Private_GetUrlScheme(struct PP_Var* url) {
- const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface;
- return iface->GetUrlScheme(*url);
-}
-
static void Pnacl_M25_PPB_NaCl_Private_LogToConsole(PP_Instance instance, const char* message) {
const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface;
iface->LogToConsole(instance, message);
@@ -5182,7 +5177,6 @@ static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = {
.InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Private_InstanceDestroyed,
.NaClDebugEnabledForURL = (PP_Bool (*)(const char* alleged_nmf_url))&Pnacl_M25_PPB_NaCl_Private_NaClDebugEnabledForURL,
.GetSandboxArch = (const char* (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetSandboxArch,
- .GetUrlScheme = (PP_UrlSchemeType (*)(struct PP_Var url))&Pnacl_M25_PPB_NaCl_Private_GetUrlScheme,
.LogToConsole = (void (*)(PP_Instance instance, const char* message))&Pnacl_M25_PPB_NaCl_Private_LogToConsole,
.GetNaClReadyState = (PP_NaClReadyState (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Private_GetNaClReadyState,
.GetIsInstalled = (PP_Bool (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Private_GetIsInstalled,