summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 23:37:41 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 23:37:41 +0000
commit4054295c0aca6a8bdf3943e083d6a6a35019080a (patch)
tree7dcfc7a7126c7dcfb59c44b0d4f7d1a2a938dc54 /remoting
parent334bb0306dfb9a10c7a865ea704ddc6e2d978ffc (diff)
downloadchromium_src-4054295c0aca6a8bdf3943e083d6a6a35019080a.zip
chromium_src-4054295c0aca6a8bdf3943e083d6a6a35019080a.tar.gz
chromium_src-4054295c0aca6a8bdf3943e083d6a6a35019080a.tar.bz2
Add HostEventLogger to It2Me host plugin.
BUG=132886 Review URL: https://chromiumcodereview.appspot.com/10827054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/plugin/host_script_object.cc6
-rw-r--r--remoting/host/plugin/host_script_object.h2
-rw-r--r--remoting/remoting.gyp92
3 files changed, 66 insertions, 34 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 891734d..de06755 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -19,6 +19,7 @@
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/host_config.h"
+#include "remoting/host/host_event_logger.h"
#include "remoting/host/host_key_pair.h"
#include "remoting/host/host_secret.h"
#include "remoting/host/it2me_host_user_interface.h"
@@ -36,6 +37,9 @@ namespace remoting {
namespace {
+// This is used for tagging system event logs.
+const char kApplicationName[] = "chromoting";
+
const char* kAttrNameAccessCode = "accessCode";
const char* kAttrNameAccessCodeLifetime = "accessCodeLifetime";
const char* kAttrNameClient = "client";
@@ -424,6 +428,7 @@ void HostNPScriptObject::OnShutdown() {
register_request_.reset();
log_to_server_.reset();
signal_strategy_.reset();
+ host_event_logger_.reset();
host_->RemoveStatusObserver(this);
host_ = NULL;
@@ -579,6 +584,7 @@ void HostNPScriptObject::FinishConnectNetworkThread(
&ChromotingHost::Shutdown, base::Unretained(host_.get()),
base::Closure());
it2me_host_user_interface_->Start(host_.get(), disconnect_callback);
+ host_event_logger_ = HostEventLogger::Create(host_, kApplicationName);
{
base::AutoLock auto_lock(ui_strings_lock_);
diff --git a/remoting/host/plugin/host_script_object.h b/remoting/host/plugin/host_script_object.h
index dd2c810..ad8ba6d 100644
--- a/remoting/host/plugin/host_script_object.h
+++ b/remoting/host/plugin/host_script_object.h
@@ -34,6 +34,7 @@ namespace remoting {
class ChromotingHost;
class DesktopEnvironment;
+class HostEventLogger;
class It2MeHostUserInterface;
class MutableHostConfig;
class RegisterSupportHostRequest;
@@ -311,6 +312,7 @@ class HostNPScriptObject : public HostStatusObserver {
scoped_ptr<LogToServer> log_to_server_;
scoped_ptr<DesktopEnvironment> desktop_environment_;
scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_;
+ scoped_ptr<HostEventLogger> host_event_logger_;
scoped_refptr<ChromotingHost> host_;
int failed_login_attempts_;
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index e8ba1a4..eaa232f 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -542,6 +542,7 @@
'remoting_version_resources',
],
'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/remoting/elevated_controller_version.rc',
'host/branding.cc',
'host/branding.h',
'host/elevated_controller.rc',
@@ -554,7 +555,6 @@
'host/usage_stats_consent_win.cc',
'host/verify_config_window_win.cc',
'host/verify_config_window_win.h',
- '<(SHARED_INTERMEDIATE_DIR)/remoting/elevated_controller_version.rc'
],
'link_settings': {
'libraries': [
@@ -588,6 +588,7 @@
'remoting_version_resources',
],
'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/remoting/host_service_version.rc',
'base/scoped_sc_handle_win.h',
'host/branding.cc',
'host/branding.h',
@@ -609,7 +610,6 @@
'host/wts_console_observer_win.h',
'host/wts_session_process_launcher_win.cc',
'host/wts_session_process_launcher_win.h',
- '<(SHARED_INTERMEDIATE_DIR)/remoting/host_service_version.rc'
],
'msvs_settings': {
'VCLinkerTool': {
@@ -881,6 +881,57 @@
}, # end of target 'remoting_client_plugin'
{
+ 'target_name': 'remoting_host_event_logger',
+ 'type': 'static_library',
+ 'variables': { 'enable_wexit_time_destructors': 1, },
+ 'dependencies': [
+ 'remoting_base',
+ ],
+ 'sources': [
+ 'host/host_event_logger.h',
+ 'host/host_event_logger_posix.cc',
+ 'host/host_event_logger_win.cc',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'sources': [
+ 'host/remoting_host_messages.mc',
+ ],
+ 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
+ 'include_dirs': [
+ '<(_output_dir)',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(_output_dir)',
+ ],
+ },
+ # Rule to run the message compiler.
+ 'rules': [
+ {
+ 'rule_name': 'message_compiler',
+ 'extension': 'mc',
+ 'inputs': [ ],
+ 'outputs': [
+ '<(_output_dir)/remoting_host_messages.h',
+ '<(_output_dir)/remoting_host_messages.rc',
+ ],
+ 'msvs_cygwin_shell': 0,
+ 'action': [
+ 'mc.exe',
+ '-h', '<(_output_dir)',
+ '-r', '<(_output_dir)/.',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'process_outputs_as_sources': 1,
+ 'message': 'Running message compiler on <(RULE_INPUT_PATH).',
+ },
+ ],
+ }],
+ ], # end of 'conditions'
+ }, # end of target 'remoting_host_event_logger'
+
+ {
'target_name': 'remoting_host_plugin',
'type': 'loadable_module',
'variables': { 'enable_wexit_time_destructors': 1, },
@@ -889,6 +940,7 @@
'dependencies': [
'remoting_base',
'remoting_host',
+ 'remoting_host_event_logger',
'remoting_jingle_glue',
'../net/net.gyp:net',
'../third_party/npapi/npapi.gyp:npapi',
@@ -957,9 +1009,9 @@
'<(INTERMEDIATE_DIR)',
],
'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/remoting/host_plugin_version.rc',
'host/host_ui.rc',
'host/plugin/host_plugin.def',
- '<(SHARED_INTERMEDIATE_DIR)/remoting/host_plugin_version.rc'
],
}],
],
@@ -1371,6 +1423,7 @@
'remoting_base',
'remoting_breakpad',
'remoting_host',
+ 'remoting_host_event_logger',
'remoting_jingle_glue',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
@@ -1380,7 +1433,6 @@
'sources': [
'host/branding.cc',
'host/branding.h',
- 'host/host_event_logger.h',
'host/sighup_listener_mac.cc',
'host/sighup_listener_mac.h',
'host/remoting_me2me_host.cc',
@@ -1388,11 +1440,6 @@
'host/usage_stats_consent_win.cc',
],
'conditions': [
- ['os_posix==1', {
- 'sources': [
- 'host/host_event_logger_posix.cc',
- ],
- }],
['OS=="mac"', {
'mac_bundle': 1,
'conditions': [
@@ -1426,32 +1473,9 @@
'remoting_version_resources',
],
'sources': [
- 'host/host_event_logger_win.cc',
+ '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host_version.rc',
'host/host_ui.rc',
- 'host/remoting_host_messages.mc',
- '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host_version.rc'
- ],
- 'include_dirs': [
- '<(INTERMEDIATE_DIR)',
- ],
- # Rule to run the message compiler.
- 'rules': [
- {
- 'rule_name': 'message_compiler',
- 'extension': 'mc',
- 'inputs': [ ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/remoting_host_messages.h',
- '<(INTERMEDIATE_DIR)/remoting_host_messages.rc',
- ],
- 'msvs_cygwin_shell': 0,
- 'msvs_quote_cmd': 0,
- 'action': [
- 'mc.exe -h <(INTERMEDIATE_DIR) -r <(INTERMEDIATE_DIR) <(RULE_INPUT_PATH)',
- ],
- 'process_outputs_as_sources': 1,
- 'message': 'Running message compiler on <(RULE_INPUT_PATH).',
- },
],
'link_settings': {
'libraries': [