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

Unified Diff: remoting/client/chromoting_client.cc

Issue 6621018: Convert Chromoting plugin logging to appear in client UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make overridden methods virtual for clang Created 9 years, 7 months 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
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/client_logger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/chromoting_client.cc
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 72cf9f1a13d747eb99c1b042e8bf0ff0988ea945..a46409bd47dd372f15007ea22d93977de9d09cf4 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -8,6 +8,7 @@
#include "remoting/base/tracer.h"
#include "remoting/client/chromoting_view.h"
#include "remoting/client/client_context.h"
+#include "remoting/client/client_logger.h"
#include "remoting/client/input_handler.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/protocol/connection_to_host.h"
@@ -21,6 +22,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
+ ClientLogger* logger,
Task* client_done)
: config_(config),
context_(context),
@@ -28,6 +30,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config,
view_(view),
rectangle_decoder_(rectangle_decoder),
input_handler_(input_handler),
+ logger_(logger),
client_done_(client_done),
state_(CREATED),
packet_being_processed_(false),
@@ -182,18 +185,18 @@ void ChromotingClient::DispatchPacket() {
}
void ChromotingClient::OnConnectionOpened(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionOpened";
+ logger_->VLog(1, "ChromotingClient::OnConnectionOpened");
Initialize();
SetConnectionState(CONNECTED);
}
void ChromotingClient::OnConnectionClosed(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionClosed";
+ logger_->VLog(1, "ChromotingClient::OnConnectionClosed");
SetConnectionState(DISCONNECTED);
}
void ChromotingClient::OnConnectionFailed(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionFailed";
+ logger_->VLog(1, "ChromotingClient::OnConnectionFailed");
SetConnectionState(FAILED);
}
@@ -261,7 +264,7 @@ void ChromotingClient::Initialize() {
// Resize the window.
int width = config->initial_resolution().width;
int height = config->initial_resolution().height;
- VLOG(1) << "Initial screen geometry: " << width << "x" << height;
+ logger_->VLog(1, "Initial screen geometry: %dx%d", width, height);
// TODO(ajwong): What to do here? Does the decoder actually need to request
// the right frame size? This is mainly an optimization right?
@@ -279,6 +282,7 @@ void ChromotingClient::Initialize() {
// ClientStub control channel interface.
void ChromotingClient::NotifyResolution(
const protocol::NotifyResolutionRequest* msg, Task* done) {
+ logger_->Log(logging::LOG_INFO, "NotifyResolution change");
NOTIMPLEMENTED();
done->Run();
delete done;
@@ -294,6 +298,8 @@ void ChromotingClient::BeginSessionResponse(
return;
}
+ logger_->Log(logging::LOG_INFO, "BeginSessionResponse received");
+
// Inform the connection that the client has been authenticated. This will
// enable the communication channels.
if (msg->success()) {
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/client_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698