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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 315753003: Pepper: Miscellaneous trusted plugin cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index f3e8855989c90a91c1c693ad22d9238a6b7186b7..6bae6a7e159181abc944214fce27d86b89d5254c 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -806,14 +806,6 @@ PP_NaClReadyState GetNaClReadyState(PP_Instance instance) {
return PP_NACL_READY_STATE_UNSENT;
}
-PP_Bool GetIsInstalled(PP_Instance instance) {
- NexeLoadManager* load_manager = GetNexeLoadManager(instance);
- DCHECK(load_manager);
- if (load_manager)
- return PP_FromBool(load_manager->is_installed());
- return PP_FALSE;
-}
-
int32_t GetExitStatus(PP_Instance instance) {
NexeLoadManager* load_manager = GetNexeLoadManager(instance);
DCHECK(load_manager);
@@ -859,7 +851,6 @@ bool CreateJsonManifest(PP_Instance instance,
const std::string& manifest_data);
void RequestNaClManifest(PP_Instance instance,
- const char* url,
PP_CompletionCallback callback) {
NexeLoadManager* load_manager = GetNexeLoadManager(instance);
DCHECK(load_manager);
@@ -871,7 +862,8 @@ void RequestNaClManifest(PP_Instance instance,
return;
}
- if (!load_manager->RequestNaClManifest(url)) {
+ std::string url = load_manager->GetManifestURLArgument();
+ if (url.empty() || !load_manager->RequestNaClManifest(url)) {
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(callback.func, callback.user_data,
@@ -923,15 +915,6 @@ void ProcessNaClManifest(PP_Instance instance, const char* program_url) {
load_manager->ProcessNaClManifest(program_url);
}
-PP_Var GetManifestURLArgument(PP_Instance instance) {
- nacl::NexeLoadManager* load_manager = GetNexeLoadManager(instance);
- if (load_manager) {
- return ppapi::StringVar::StringToPPVar(
- load_manager->GetManifestURLArgument());
- }
- return PP_MakeUndefined();
-}
-
PP_Bool DevInterfacesEnabled(PP_Instance instance) {
nacl::NexeLoadManager* load_manager = GetNexeLoadManager(instance);
if (load_manager)
@@ -1528,6 +1511,22 @@ void DownloadFile(PP_Instance instance,
file_downloader->Load(url_request);
}
+void ReportSelLdrStatus(PP_Instance instance,
+ int32_t load_status,
+ int32_t max_status) {
+ HistogramEnumerate("NaCl.LoadStatus.SelLdr", load_status, max_status);
+ NexeLoadManager* load_manager = GetNexeLoadManager(instance);
+ DCHECK(load_manager);
+ if (!load_manager)
+ return;
+
+ // Gather data to see if being installed changes load outcomes.
+ const char* name = load_manager->is_installed() ?
+ "NaCl.LoadStatus.SelLdr.InstalledApp" :
+ "NaCl.LoadStatus.SelLdr.NotInstalledApp";
+ HistogramEnumerate(name, load_status, max_status);
+}
+
const PPB_NaCl_Private nacl_interface = {
&LaunchSelLdr,
&StartPpapiProxy,
@@ -1551,7 +1550,6 @@ const PPB_NaCl_Private nacl_interface = {
&GetSandboxArch,
&LogToConsole,
&GetNaClReadyState,
- &GetIsInstalled,
&GetExitStatus,
&SetExitStatus,
&Vlog,
@@ -1560,7 +1558,6 @@ const PPB_NaCl_Private nacl_interface = {
&RequestNaClManifest,
&GetManifestBaseURL,
&ProcessNaClManifest,
- &GetManifestURLArgument,
&DevInterfacesEnabled,
&ManifestGetProgramURL,
&ManifestResolveKey,
@@ -1568,7 +1565,8 @@ const PPB_NaCl_Private nacl_interface = {
&GetCpuFeatureAttrs,
&PostMessageToJavaScript,
&DownloadNexe,
- &DownloadFile
+ &DownloadFile,
+ &ReportSelLdrStatus
};
} // namespace
« no previous file with comments | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698