diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 01:35:27 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 01:35:27 +0000 |
commit | 005d5485371fe12b6abbe82604f997df400fbf97 (patch) | |
tree | 2ea5d95e957bba13cbe83a8ccfe02fe4a2e1deca /remoting | |
parent | 2aff5043bc7596acf7476f43119f4fb8314ffcb2 (diff) | |
download | chromium_src-005d5485371fe12b6abbe82604f997df400fbf97.zip chromium_src-005d5485371fe12b6abbe82604f997df400fbf97.tar.gz chromium_src-005d5485371fe12b6abbe82604f997df400fbf97.tar.bz2 |
More logs from chromoting pepper client
Adding connection info, desktop size and progress of logging in.
BUG=71630
TEST=None
Review URL: http://codereview.chromium.org/6588103
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/client/plugin/chromoting_scriptable_object.cc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc index 95a91b2..497e803 100644 --- a/remoting/client/plugin/chromoting_scriptable_object.cc +++ b/remoting/client/plugin/chromoting_scriptable_object.cc @@ -5,6 +5,7 @@ #include "remoting/client/plugin/chromoting_scriptable_object.h" #include "base/logging.h" +#include "base/stringprintf.h" #include "ppapi/cpp/var.h" #include "remoting/client/client_config.h" #include "remoting/client/plugin/chromoting_instance.h" @@ -170,6 +171,9 @@ void ChromotingScriptableObject::SetConnectionInfo(ConnectionStatus status, int status_index = property_names_[kStatusAttribute]; int quality_index = property_names_[kQualityAttribute]; + LogDebugInfo( + base::StringPrintf("Connection status is updated: %d.", status)); + if (properties_[status_index].attribute.AsInt() != status || properties_[quality_index].attribute.AsInt() != quality) { // Update the connection state properties.. @@ -204,6 +208,9 @@ void ChromotingScriptableObject::SetDesktopSize(int width, int height) { properties_[width_index].attribute = Var(width); properties_[height_index].attribute = Var(height); } + + LogDebugInfo(base::StringPrintf("Update desktop size to: %d x %d.", + width, height)); } void ChromotingScriptableObject::AddAttribute(const std::string& name, @@ -226,10 +233,9 @@ void ChromotingScriptableObject::SignalConnectionInfoChange() { // a method in the object. cb.Call(Var(), 0, NULL, &exception); - if (!exception.is_undefined()) { - LOG(WARNING) << "Exception when invoking connectionInfoUpdate JS callback: " - << exception.DebugString(); - } + if (!exception.is_undefined()) + LogDebugInfo( + "Exception when invoking connectionInfoUpdate JS callback."); } void ChromotingScriptableObject::SignalLoginChallenge() { @@ -240,10 +246,8 @@ void ChromotingScriptableObject::SignalLoginChallenge() { // a method in the object. cb.Call(Var(), 0, NULL, &exception); - if (!exception.is_undefined()) { - LOG(WARNING) << "Exception when invoking loginChallenge JS callback: " - << exception.DebugString(); - } + if (!exception.is_undefined()) + LogDebugInfo("Exception when invoking loginChallenge JS callback."); } Var ChromotingScriptableObject::DoConnect(const std::vector<Var>& args, @@ -273,6 +277,7 @@ Var ChromotingScriptableObject::DoConnect(const std::vector<Var>& args, } config.auth_token = args[2].AsString(); + LogDebugInfo("Connecting to host."); instance_->Connect(config); return Var(); @@ -280,6 +285,8 @@ Var ChromotingScriptableObject::DoConnect(const std::vector<Var>& args, Var ChromotingScriptableObject::DoDisconnect(const std::vector<Var>& args, Var* exception) { + LogDebugInfo("Disconnecting from host."); + instance_->Disconnect(); return Var(); } @@ -303,6 +310,7 @@ Var ChromotingScriptableObject::DoSubmitLogin(const std::vector<Var>& args, } std::string password = args[1].AsString(); + LogDebugInfo("Submitting login info to host."); instance_->SubmitLoginInfo(username, password); return Var(); } |