Index: sync/engine/commit.cc |
diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc |
index c7af4491f10661c7ecfe22b45f9446feb82a3100..a8db1a41ee3821cad3572ad1b044b88075306410 100644 |
--- a/sync/engine/commit.cc |
+++ b/sync/engine/commit.cc |
@@ -110,6 +110,11 @@ SyncerError Commit::PostAndProcessResponse( |
} |
session->mutable_status_controller()->set_commit_request_types(request_types); |
+ if (session->context()->debug_info_getter()) { |
+ sync_pb::DebugInfo* debug_info = message_.mutable_debug_info(); |
+ session->context()->debug_info_getter()->GetDebugInfo(debug_info); |
+ } |
+ |
DVLOG(1) << "Sending commit message."; |
TRACE_EVENT_BEGIN0("sync", "PostCommit"); |
const SyncerError post_result = SyncerProtoUtil::PostClientToServerMessage( |
@@ -136,6 +141,12 @@ SyncerError Commit::PostAndProcessResponse( |
return SERVER_RESPONSE_VALIDATION_FAILED; |
} |
+ if (session->context()->debug_info_getter()) { |
+ // Clear debug info now that we have successfully sent it to the server. |
+ DVLOG(1) << "Clearing client debug info."; |
+ session->context()->debug_info_getter()->ClearDebugInfo(); |
+ } |
+ |
// Let the contributors process the responses to each of their requests. |
SyncerError processing_result = SYNCER_OK; |
for (std::map<ModelType, SyncDirectoryCommitContribution*>::iterator it = |