Chromium Code Reviews| 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); |
| { |