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

Unified Diff: sync/engine/syncer_proto_util.cc

Issue 9663023: Log the sync communication that happens between client and server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 8 years, 9 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 | « no previous file | sync/engine/traffic_logger.h » ('j') | sync/engine/traffic_logger.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_proto_util.cc
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index c5041d29db4ad8e5064c9c5e280252f05da552b6..8e5a4725f636dd49af3ece9beb7101c81a2f2fa8 100644
--- a/sync/engine/syncer_proto_util.cc
+++ b/sync/engine/syncer_proto_util.cc
@@ -5,10 +5,12 @@
#include "sync/engine/syncer_proto_util.h"
#include "base/format_macros.h"
+#include "base/json/json_writer.h"
akalin 2012/03/17 01:55:05 remove this unneeded include
lipalani1 2012/03/19 19:24:37 Done.
#include "base/stringprintf.h"
#include "sync/engine/net/server_connection_manager.h"
#include "sync/engine/syncer.h"
#include "sync/engine/syncer_types.h"
+#include "sync/engine/traffic_logger.h"
#include "sync/protocol/service_constants.h"
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/sync_enums.pb.h"
@@ -337,6 +339,7 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage(
syncable::Directory* dir = session->context()->directory();
+ LogClientToServerMessage(msg);
if (!PostAndProcessHeaders(session->context()->connection_manager(), session,
msg, response)) {
// There was an error establishing communication with the server.
@@ -350,6 +353,8 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage(
return ServerConnectionErrorAsSyncerError(server_status);
}
+ LogClientToServerResponse(*response);
+
browser_sync::SyncProtocolError sync_protocol_error;
// Birthday mismatch overrides any error that is sent by the server.
« no previous file with comments | « no previous file | sync/engine/traffic_logger.h » ('j') | sync/engine/traffic_logger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698