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

Unified Diff: remoting/host/plugin/host_plugin.cc

Issue 7648042: Change Chromoting logger to be setup in plugin's NP_Initialize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « no previous file | remoting/host/plugin/host_script_object.h » ('j') | remoting/host/plugin/host_script_object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_plugin.cc
diff --git a/remoting/host/plugin/host_plugin.cc b/remoting/host/plugin/host_plugin.cc
index f901a03db816b0f117c9a2c183b97c9130a5d48f..62d35c45cee2464b6b0f0c74d98d9e2aba732201 100644
--- a/remoting/host/plugin/host_plugin.cc
+++ b/remoting/host/plugin/host_plugin.cc
@@ -421,6 +421,9 @@ EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* npnetscape_funcs
if(((npnetscape_funcs->version & 0xff00) >> 8) > NP_VERSION_MAJOR)
return NPERR_INCOMPATIBLE_VERSION_ERROR;
+ // Register a global log handler.
+ HostNPScriptObject::RegisterLogger();
+
g_at_exit_manager = new base::AtExitManager;
g_npnetscape_funcs = npnetscape_funcs;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -433,6 +436,10 @@ EXPORT NPError API_CALL NP_Shutdown() {
VLOG(2) << "NP_Shutdown";
delete g_at_exit_manager;
g_at_exit_manager = NULL;
+
+ // Remove the global log handler.
+ HostNPScriptObject::UnregisterLogger();
+
return NPERR_NO_ERROR;
}
« no previous file with comments | « no previous file | remoting/host/plugin/host_script_object.h » ('j') | remoting/host/plugin/host_script_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698