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

Unified Diff: sync/engine/commit.cc

Issue 82303002: Send debug event info on Commit requests, not just GetUpdates requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dont-clear-debug-info-2
Patch Set: Created 7 years, 1 month 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/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « no previous file | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698