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

Unified Diff: chrome/browser/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
Index: chrome/browser/sync/engine/syncer_proto_util.cc
diff --git a/chrome/browser/sync/engine/syncer_proto_util.cc b/chrome/browser/sync/engine/syncer_proto_util.cc
index e2e235b30328c8389f63dd11bd1d7acb9e5b8e54..fbb272e6b8a9aee49faa6707facefefe4c73d804 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.cc
+++ b/chrome/browser/sync/engine/syncer_proto_util.cc
@@ -5,10 +5,13 @@
#include "chrome/browser/sync/engine/syncer_proto_util.h"
#include "base/format_macros.h"
+#include "base/json/json_writer.h"
#include "base/stringprintf.h"
#include "chrome/browser/sync/engine/net/server_connection_manager.h"
#include "chrome/browser/sync/engine/syncer.h"
#include "chrome/browser/sync/engine/syncer_types.h"
+#include "chrome/browser/sync/engine/traffic_logger.h"
+#include "chrome/browser/sync/protocol/proto_value_conversions.h"
#include "chrome/browser/sync/protocol/service_constants.h"
#include "chrome/browser/sync/protocol/sync_protocol_error.h"
#include "chrome/browser/sync/sessions/sync_session.h"
@@ -337,6 +340,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 +354,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 | chrome/browser/sync/engine/traffic_logger.h » ('j') | chrome/browser/sync/engine/traffic_logger.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698