diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 23:49:52 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 23:49:52 +0000 |
commit | 6504ccb162e1fa1776cf20c466a9e9e71ada827f (patch) | |
tree | 68a4b8c6de027d51dd79a7419d8849c9d4819e9b | |
parent | 5f2d7017a397fef6245981de1a27c72c8dc89084 (diff) | |
download | chromium_src-6504ccb162e1fa1776cf20c466a9e9e71ada827f.zip chromium_src-6504ccb162e1fa1776cf20c466a9e9e71ada827f.tar.gz chromium_src-6504ccb162e1fa1776cf20c466a9e9e71ada827f.tar.bz2 |
Convert LOG(INFO) to VLOG(1) - remoting/.
Also, remove some extra {}s and unnecessary endls.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3913001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63141 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/base/tracer.cc | 12 | ||||
-rw-r--r-- | remoting/client/chromoting_client.cc | 8 | ||||
-rw-r--r-- | remoting/client/client_util.cc | 25 | ||||
-rw-r--r-- | remoting/client/jingle_host_connection.cc | 4 | ||||
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 9 | ||||
-rw-r--r-- | remoting/host/chromoting_host.cc | 13 | ||||
-rw-r--r-- | remoting/host/heartbeat_sender.cc | 2 | ||||
-rw-r--r-- | remoting/jingle_glue/ssl_socket_adapter.cc | 2 | ||||
-rw-r--r-- | remoting/jingle_glue/xmpp_socket_adapter.cc | 18 |
9 files changed, 39 insertions, 54 deletions
diff --git a/remoting/base/tracer.cc b/remoting/base/tracer.cc index 29b2b62..4d30f91 100644 --- a/remoting/base/tracer.cc +++ b/remoting/base/tracer.cc @@ -47,19 +47,19 @@ class OutputLogger { } void LogOneTrace(TraceBuffer* buffer) { - LOG(INFO) << "Trace: " << buffer->name(); + VLOG(1) << "Trace: " << buffer->name(); base::Time last_timestamp; for (int i = 0; i < buffer->record_size(); ++i) { const TraceRecord& record = buffer->record(i); base::Time timestamp = base::Time::FromInternalValue(record.timestamp()); if (i == 0) { - LOG(INFO) << " TS: " << record.timestamp() - << " msg: " << record.annotation(); + VLOG(1) << " TS: " << record.timestamp() + << " msg: " << record.annotation(); } else { base::TimeDelta delta = timestamp - last_timestamp; - LOG(INFO) << " TS: " << record.timestamp() - << " msg: " << record.annotation() - << " [ " << delta.InMilliseconds() << "ms ]"; + VLOG(1) << " TS: " << record.timestamp() + << " msg: " << record.annotation() + << " [ " << delta.InMilliseconds() << "ms ]"; } last_timestamp = timestamp; } diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc index 272f293..af3d8f1 100644 --- a/remoting/client/chromoting_client.cc +++ b/remoting/client/chromoting_client.cc @@ -150,17 +150,17 @@ void ChromotingClient::DispatchMessage() { } void ChromotingClient::OnConnectionOpened(HostConnection* conn) { - LOG(INFO) << "ChromotingClient::OnConnectionOpened"; + VLOG(1) << "ChromotingClient::OnConnectionOpened"; SetConnectionState(CONNECTED); } void ChromotingClient::OnConnectionClosed(HostConnection* conn) { - LOG(INFO) << "ChromotingClient::OnConnectionClosed"; + VLOG(1) << "ChromotingClient::OnConnectionClosed"; SetConnectionState(DISCONNECTED); } void ChromotingClient::OnConnectionFailed(HostConnection* conn) { - LOG(INFO) << "ChromotingClient::OnConnectionFailed"; + VLOG(1) << "ChromotingClient::OnConnectionFailed"; SetConnectionState(FAILED); } @@ -207,7 +207,7 @@ void ChromotingClient::InitClient(const InitClientMessage& init_client, // Resize the window. int width = init_client.width(); int height = init_client.height(); - LOG(INFO) << "Init client received geometry: " << width << "x" << height; + VLOG(1) << "Init client received geometry: " << width << "x" << height; // TODO(ajwong): What to do here? Does the decoder actually need to request // the right frame size? This is mainly an optimization right? diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc index 28bd7cc..6d241ac 100644 --- a/remoting/client/client_util.cc +++ b/remoting/client/client_util.cc @@ -29,48 +29,37 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) { std::string arg = argv[i]; if (arg == "--host_jid") { if (++i >= argc) { - LOG(WARNING) << "Expected Host JID to follow --host_jid option" - << std::endl; + LOG(WARNING) << "Expected Host JID to follow --host_jid option"; } else { found_host_jid = true; host_jid = argv[i]; } } else if (arg == "--jid") { if (++i >= argc) { - LOG(WARNING) << "Expected JID to follow --jid option" << std::endl; + LOG(WARNING) << "Expected JID to follow --jid option"; } else { found_jid = true; username = argv[i]; } } else if (arg == "--token") { if (++i >= argc) { - LOG(WARNING) << "Expected Auth token to follow --token option" - << std::endl; + LOG(WARNING) << "Expected Auth token to follow --token option"; } else { found_auth_token = true; auth_token = argv[i]; } } else { - LOG(WARNING) << "Unrecognized option: " << arg << std::endl; + LOG(WARNING) << "Unrecognized option: " << arg; } } - if (!found_host_jid) { + if (!found_host_jid) return false; - } // Validate the chromoting host JID. - if (host_jid.find("/chromoting") == std::string::npos) { - return false; - } - - if (!found_jid) { + if ((host_jid.find("/chromoting") == std::string::npos) || !found_jid || + !found_auth_token) return false; - } - - if (!found_auth_token) { - return false; - } config->host_jid = host_jid; config->username = username; diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc index 044c9ee..f40f720 100644 --- a/remoting/client/jingle_host_connection.cc +++ b/remoting/client/jingle_host_connection.cc @@ -109,10 +109,10 @@ void JingleHostConnection::OnStateChange(JingleClient* client, DCHECK(event_callback_); if (state == JingleClient::CONNECTED) { - LOG(INFO) << "Connected as: " << client->GetFullJid(); + VLOG(1) << "Connected as: " << client->GetFullJid(); InitConnection(); } else if (state == JingleClient::CLOSED) { - LOG(INFO) << "Connection closed."; + VLOG(1) << "Connection closed."; event_callback_->OnConnectionClosed(this); } } diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 2f61c92..3a5f2fa 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -61,7 +61,7 @@ bool ChromotingInstance::Init(uint32_t argc, // TODO(ajwong): See if there is a method for querying what thread we're on // from inside the pepper API. pepper_main_loop_dont_post_to_me_ = MessageLoop::current(); - LOG(INFO) << "Started ChromotingInstance::Init"; + VLOG(1) << "Started ChromotingInstance::Init"; // Start all the threads. context_.Start(); @@ -114,11 +114,8 @@ void ChromotingInstance::ViewChanged(const pp::Rect& position, // TODO(ajwong): This is going to be a race condition when the view changes // and we're in the middle of a Paint(). - LOG(INFO) << "ViewChanged " - << position.x() << "," - << position.y() << "," - << position.width() << "," - << position.height(); + VLOG(1) << "ViewChanged " << position.x() << "," << position.y() << "," + << position.width() << "," << position.height(); view_->SetViewport(position.x(), position.y(), position.width(), position.height()); diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index f944226..d28ca79 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -152,7 +152,7 @@ void ChromotingHost::OnClientConnected(ClientConnection* client) { // Immediately add the client and start the session. session_->AddClient(client); session_->Start(); - LOG(INFO) << "Session manager started"; + VLOG(1) << "Session manager started"; } void ChromotingHost::OnClientDisconnected(ClientConnection* client) { @@ -188,14 +188,14 @@ void ChromotingHost::OnConnectionOpened(ClientConnection* client) { DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); // Completes the client connection. - LOG(INFO) << "Connection to client established."; + VLOG(1) << "Connection to client established."; OnClientConnected(client_.get()); } void ChromotingHost::OnConnectionClosed(ClientConnection* client) { DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); - LOG(INFO) << "Connection to client closed."; + VLOG(1) << "Connection to client closed."; OnClientDisconnected(client_.get()); } @@ -212,8 +212,7 @@ void ChromotingHost::OnStateChange(JingleClient* jingle_client, JingleClient::State state) { if (state == JingleClient::CONNECTED) { DCHECK_EQ(jingle_client_.get(), jingle_client); - LOG(INFO) << "Host connected as " - << jingle_client->GetFullJid() << "." << std::endl; + VLOG(1) << "Host connected as " << jingle_client->GetFullJid(); // Create and start |chromotocol_server_|. chromotocol_server_ = @@ -226,7 +225,7 @@ void ChromotingHost::OnStateChange(JingleClient* jingle_client, // Start heartbeating. heartbeat_sender_->Start(); } else if (state == JingleClient::CLOSED) { - LOG(INFO) << "Host disconnected from talk network." << std::endl; + VLOG(1) << "Host disconnected from talk network."; // Stop heartbeating. heartbeat_sender_->Stop(); @@ -254,7 +253,7 @@ void ChromotingHost::OnNewClientConnection( *accept = true; - LOG(INFO) << "Client connected: " << connection->jid() << std::endl; + VLOG(1) << "Client connected: " << connection->jid(); // If we accept the connected then create a client object and set the // callback. diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc index e6a78f7..b4caf57f 100644 --- a/remoting/host/heartbeat_sender.cc +++ b/remoting/host/heartbeat_sender.cc @@ -95,7 +95,7 @@ void HeartbeatSender::DoSendStanza() { // |STOPPED|, so don't touch it here unless we are in |STARTED| state. DCHECK(MessageLoop::current() == jingle_client_->message_loop()); - LOG(INFO) << "Sending heartbeat stanza to " << kChromotingBotJid; + VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid; request_->SendIq(buzz::STR_SET, kChromotingBotJid, CreateHeartbeatMessage()); diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc index 3f49325..8936963 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.cc +++ b/remoting/jingle_glue/ssl_socket_adapter.cc @@ -120,7 +120,7 @@ int SSLSocketAdapter::Recv(void* buf, size_t len) { } else { if (result < 0) { SetError(result); - LOG(INFO) << "Socket error " << result; + VLOG(1) << "Socket error " << result; } transport_buf_ = NULL; } diff --git a/remoting/jingle_glue/xmpp_socket_adapter.cc b/remoting/jingle_glue/xmpp_socket_adapter.cc index 08f72aa..88bdf97 100644 --- a/remoting/jingle_glue/xmpp_socket_adapter.cc +++ b/remoting/jingle_glue/xmpp_socket_adapter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -76,7 +76,7 @@ bool XmppSocketAdapter::Connect(const talk_base::SocketAddress& addr) { return false; } - LOG(INFO) << "XmppSocketAdapter::Connect(" << addr.ToString() << ")"; + VLOG(1) << "XmppSocketAdapter::Connect(" << addr.ToString() << ")"; // Clean up any previous socket - cannot delete socket on close because close // happens during the child socket's stack callback. @@ -250,8 +250,8 @@ bool XmppSocketAdapter::Close() { if (state_ != STATE_CLOSED) { // The socket was closed manually, not directly due to error. if (error_ != ERROR_NONE) { - LOG(INFO) << "XmppSocketAdapter::Close - previous Error: " << error_ - << " WSAError: " << wsa_error_; + VLOG(1) << "XmppSocketAdapter::Close - previous Error: " << error_ + << " WSAError: " << wsa_error_; error_ = ERROR_NONE; wsa_error_ = 0; } @@ -264,8 +264,8 @@ void XmppSocketAdapter::NotifyClose() { if (state_ == STATE_CLOSED) { SetError(ERROR_WRONGSTATE); } else { - LOG(INFO) << "XmppSocketAdapter::NotifyClose - Error: " << error_ - << " WSAError: " << wsa_error_; + VLOG(1) << "XmppSocketAdapter::NotifyClose - Error: " << error_ + << " WSAError: " << wsa_error_; state_ = STATE_CLOSED; SignalClosed(); FreeState(); @@ -275,12 +275,12 @@ void XmppSocketAdapter::NotifyClose() { void XmppSocketAdapter::OnConnectEvent(talk_base::AsyncSocket *socket) { if (state_ == STATE_CONNECTING) { state_ = STATE_OPEN; - LOG(INFO) << "XmppSocketAdapter::OnConnectEvent - STATE_OPEN"; + VLOG(1) << "XmppSocketAdapter::OnConnectEvent - STATE_OPEN"; SignalConnected(); #if defined(FEATURE_ENABLE_SSL) } else if (state_ == STATE_TLS_CONNECTING) { state_ = STATE_TLS_OPEN; - LOG(INFO) << "XmppSocketAdapter::OnConnectEvent - STATE_TLS_OPEN"; + VLOG(1) << "XmppSocketAdapter::OnConnectEvent - STATE_TLS_OPEN"; SignalSSLConnected(); if (write_buffer_length_ > 0) { HandleWritable(); @@ -302,7 +302,7 @@ void XmppSocketAdapter::OnWriteEvent(talk_base::AsyncSocket *socket) { void XmppSocketAdapter::OnCloseEvent(talk_base::AsyncSocket *socket, int error) { - LOG(INFO) << "XmppSocketAdapter::OnCloseEvent(" << error << ")"; + VLOG(1) << "XmppSocketAdapter::OnCloseEvent(" << error << ")"; SetWSAError(error); if (error == SOCKET_EACCES) { SignalAuthenticationError(); // Proxy needs authentication. |