OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/plugin/host_script_object.h" | 5 #include "remoting/host/plugin/host_script_object.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/strings/sys_string_conversions.h" | 12 #include "base/strings/sys_string_conversions.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "remoting/base/auth_token_util.h" | 14 #include "remoting/base/auth_token_util.h" |
15 #include "remoting/base/auto_thread.h" | 15 #include "remoting/base/auto_thread.h" |
| 16 #include "remoting/base/logging.h" |
16 #include "remoting/base/resources.h" | 17 #include "remoting/base/resources.h" |
17 #include "remoting/base/rsa_key_pair.h" | 18 #include "remoting/base/rsa_key_pair.h" |
18 #include "remoting/host/chromoting_host_context.h" | 19 #include "remoting/host/chromoting_host_context.h" |
19 #include "remoting/host/host_config.h" | 20 #include "remoting/host/host_config.h" |
20 #include "remoting/host/pairing_registry_delegate.h" | 21 #include "remoting/host/pairing_registry_delegate.h" |
21 #include "remoting/host/pin_hash.h" | 22 #include "remoting/host/pin_hash.h" |
22 #include "remoting/host/plugin/host_log_handler.h" | 23 #include "remoting/host/plugin/host_log_handler.h" |
23 #include "remoting/host/policy_hack/policy_watcher.h" | 24 #include "remoting/host/policy_hack/policy_watcher.h" |
24 #include "remoting/host/service_urls.h" | 25 #include "remoting/host/service_urls.h" |
25 #include "third_party/npapi/bindings/npapi.h" | 26 #include "third_party/npapi/bindings/npapi.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 441 } |
441 return true; | 442 return true; |
442 } | 443 } |
443 | 444 |
444 // string username, string auth_token | 445 // string username, string auth_token |
445 bool HostNPScriptObject::Connect(const NPVariant* args, | 446 bool HostNPScriptObject::Connect(const NPVariant* args, |
446 uint32_t arg_count, | 447 uint32_t arg_count, |
447 NPVariant* result) { | 448 NPVariant* result) { |
448 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); | 449 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); |
449 | 450 |
450 LOG(INFO) << "Connecting..."; | 451 HOST_LOG << "Connecting..."; |
451 | 452 |
452 if (arg_count != 2) { | 453 if (arg_count != 2) { |
453 SetException("connect: bad number of arguments"); | 454 SetException("connect: bad number of arguments"); |
454 return false; | 455 return false; |
455 } | 456 } |
456 | 457 |
457 if (it2me_host_.get()) { | 458 if (it2me_host_.get()) { |
458 SetException("connect: can be called only when disconnected"); | 459 SetException("connect: can be called only when disconnected"); |
459 return false; | 460 return false; |
460 } | 461 } |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 if (is_good) | 1098 if (is_good) |
1098 g_npnetscape_funcs->releasevariantvalue(&np_result); | 1099 g_npnetscape_funcs->releasevariantvalue(&np_result); |
1099 | 1100 |
1100 return is_good; | 1101 return is_good; |
1101 } | 1102 } |
1102 | 1103 |
1103 void HostNPScriptObject::SetException(const std::string& exception_string) { | 1104 void HostNPScriptObject::SetException(const std::string& exception_string) { |
1104 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); | 1105 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); |
1105 | 1106 |
1106 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); | 1107 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); |
1107 LOG(INFO) << exception_string; | 1108 HOST_LOG << exception_string; |
1108 } | 1109 } |
1109 | 1110 |
1110 } // namespace remoting | 1111 } // namespace remoting |
OLD | NEW |