summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc7
-rw-r--r--content/ppapi_plugin/ppapi_thread.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 3277f1b..154826c 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -147,6 +147,8 @@ void PpapiThread::Unregister(uint32 plugin_dispatcher_id) {
}
void PpapiThread::OnMsgLoadPlugin(const FilePath& path) {
+ SavePluginName(path);
+
std::string error;
base::ScopedNativeLibrary library(base::LoadNativeLibrary(path, &error));
@@ -319,3 +321,8 @@ bool PpapiThread::SetupRendererChannel(base::ProcessHandle host_process_handle,
// lifetime of the attached channel.
return true;
}
+
+void PpapiThread::SavePluginName(const FilePath& path) {
+ ppapi::proxy::PluginGlobals::Get()->set_plugin_name(
+ path.BaseName().AsUTF8Unsafe());
+}
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index bff66db..0784dd3 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -64,6 +64,9 @@ class PpapiThread : public ChildThread,
int renderer_id,
IPC::ChannelHandle* handle);
+ // Sets up the name of the plugin for logging using the given path.
+ void SavePluginName(const FilePath& path);
+
// True if running in a broker process rather than a normal plugin process.
bool is_broker_;