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

Unified Diff: chrome/browser/sync/engine/download_updates_command.cc

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 years, 2 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/download_updates_command.cc
diff --git a/chrome/browser/sync/engine/download_updates_command.cc b/chrome/browser/sync/engine/download_updates_command.cc
index 7677989210cb691c5fe38a06dea474419a67a0e1..7119c4ab59c4c7a1ae8c3c5683c0154e309418e6 100644
--- a/chrome/browser/sync/engine/download_updates_command.cc
+++ b/chrome/browser/sync/engine/download_updates_command.cc
@@ -29,6 +29,7 @@ DownloadUpdatesCommand::~DownloadUpdatesCommand() {}
void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
ClientToServerMessage client_to_server_message;
ClientToServerResponse update_response;
+ SyncOperationResult result;
client_to_server_message.set_share(session->context()->account_name());
client_to_server_message.set_message_contents(
@@ -44,6 +45,9 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
session->context()->account_name());
if (!dir.good()) {
LOG(ERROR) << "Scoped dir lookup failed!";
+ result.error_type = DIRECTORY_LOOKUP_FAILED;
+ session->status_controller()->set_last_download_updates_result(
+ result);
return;
}
@@ -83,7 +87,7 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message);
- bool ok = SyncerProtoUtil::PostClientToServerMessage(
+ result = SyncerProtoUtil::PostClientToServerMessage(
client_to_server_message,
&update_response,
session);
@@ -93,10 +97,12 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
StatusController* status = session->status_controller();
status->set_updates_request_types(enabled_types);
- if (!ok) {
+ status->set_last_download_updates_result(result);
+ if (result.error_type != OPERATION_SUCCESS) {
status->increment_num_consecutive_errors();
status->mutable_updates_response()->Clear();
- LOG(ERROR) << "PostClientToServerMessage() failed during GetUpdates";
+ LOG(ERROR) << "Get updates failed with return code: "
+ << browser_sync::GetSyncErrorTypeString(result.error_type);
return;
}
« no previous file with comments | « chrome/browser/sync/engine/clear_data_command.cc ('k') | chrome/browser/sync/engine/post_commit_message_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698