| Index: chrome/browser/sync/engine/post_commit_message_command.cc
|
| diff --git a/chrome/browser/sync/engine/post_commit_message_command.cc b/chrome/browser/sync/engine/post_commit_message_command.cc
|
| index c9b4af4410e11d705c4046005b2b9dd6aec003de..556d872088b4e7a2e48a649d69f9f4e3c0591d94 100644
|
| --- a/chrome/browser/sync/engine/post_commit_message_command.cc
|
| +++ b/chrome/browser/sync/engine/post_commit_message_command.cc
|
| @@ -20,16 +20,24 @@ PostCommitMessageCommand::PostCommitMessageCommand() {}
|
| PostCommitMessageCommand::~PostCommitMessageCommand() {}
|
|
|
| void PostCommitMessageCommand::ExecuteImpl(sessions::SyncSession* session) {
|
| - if (session->status_controller()->commit_ids().empty())
|
| + sessions::StatusController* status = session->status_controller();
|
| + SyncOperationResult result;
|
| + if (status->commit_ids().empty())
|
| return; // Nothing to commit.
|
| ClientToServerResponse response;
|
| syncable::ScopedDirLookup dir(session->context()->directory_manager(),
|
| session->context()->account_name());
|
| - if (!dir.good())
|
| + if (!dir.good()) {
|
| + result.error_type = DIRECTORY_LOOKUP_FAILED;
|
| + status->set_last_post_commit_result(result);
|
| return;
|
| - sessions::StatusController* status = session->status_controller();
|
| - if (!SyncerProtoUtil::PostClientToServerMessage(status->commit_message(),
|
| - &response, session)) {
|
| + }
|
| + result = SyncerProtoUtil::PostClientToServerMessage(status->commit_message(),
|
| + &response, session);
|
| + status->set_last_post_commit_result(result);
|
| + if (result.error_type != OPERATION_SUCCESS) {
|
| + VLOG(1) << "Post commit message failed with return code: " <<
|
| + GetSyncErrorTypeString(result.error_type);
|
| // None of our changes got through. Clear the SYNCING bit which was
|
| // set to true during BuildCommitCommand, and which may still be true.
|
| // Not to be confused with IS_UNSYNCED, this bit is used to detect local
|
|
|