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

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

Issue 8468015: The host sends simple log entries to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 9 years, 1 month 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
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 7a23eccc47b6948d8e2d41daaa21219d992843b9..c1e98ddffa9178ea1631dfcae0321c0b4479ed60 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -92,7 +92,8 @@ HostNPScriptObject::HostNPScriptObject(
disconnected_event_(true, false),
am_currently_logging_(false),
nat_traversal_enabled_(false),
- policy_received_(false) {
+ policy_received_(false),
+ enable_log_to_server_(false) {
}
HostNPScriptObject::~HostNPScriptObject() {
@@ -512,6 +513,10 @@ void HostNPScriptObject::FinishConnect(
host_config_ = host_config;
register_request_.reset(register_request.release());
+ if (enable_log_to_server_) {
Sergey Ulanov 2011/11/22 02:01:43 nit: please remove brackets for consistency with o
simonmorris 2011/11/22 23:27:35 Merged with another if, so braces are now needed.
+ log_to_server_.reset(new LogToServer(host_context_.network_message_loop()));
+ }
+
// Create the Host.
LOG(INFO) << "NAT state: " << nat_traversal_enabled_;
host_ = ChromotingHost::Create(
@@ -519,6 +524,9 @@ void HostNPScriptObject::FinishConnect(
access_verifier.release(), nat_traversal_enabled_);
host_->AddStatusObserver(this);
host_->AddStatusObserver(register_request_.get());
+ if (log_to_server_.get()) {
Sergey Ulanov 2011/11/22 02:01:43 nit: I think you can merge this if and the previou
simonmorris 2011/11/22 23:27:35 Done.
+ host_->AddStatusObserver(log_to_server_.get());
+ }
host_->set_it2me(true);
{

Powered by Google App Engine
This is Rietveld 408576698