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

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

Issue 9158004: Detect sync server communication errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for review comments Created 8 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/sync/engine/download_updates_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/clear_data_command.cc
diff --git a/chrome/browser/sync/engine/clear_data_command.cc b/chrome/browser/sync/engine/clear_data_command.cc
index 248fc8326d660a4d554f07f220a912bd3f3f774e..f5cd39dc6470048b17ae532b499af4ebd77a9b55 100644
--- a/chrome/browser/sync/engine/clear_data_command.cc
+++ b/chrome/browser/sync/engine/clear_data_command.cc
@@ -47,7 +47,7 @@ SyncerError ClearDataCommand::ExecuteImpl(SyncSession* session) {
DVLOG(1) << "Clearing server data";
- bool ok = SyncerProtoUtil::PostClientToServerMessage(
+ SyncerError result = SyncerProtoUtil::PostClientToServerMessage(
client_to_server_message,
&client_to_server_response,
session);
@@ -61,7 +61,7 @@ SyncerError ClearDataCommand::ExecuteImpl(SyncSession* session) {
// See also: crbug.com/71616.
//
// Clear pending indicates that the server has received our clear message
- if (!ok || !client_to_server_response.has_error_code() ||
+ if (result != SYNCER_OK || !client_to_server_response.has_error_code() ||
client_to_server_response.error_code() != sync_pb::SyncEnums::SUCCESS) {
// On failure, subsequent requests to the server will cause it to attempt
// to resume the clear. The client will handle disabling of sync in
@@ -71,7 +71,7 @@ SyncerError ClearDataCommand::ExecuteImpl(SyncSession* session) {
LOG(ERROR) << "Error posting ClearData.";
- return SYNCER_OK;
+ return result;
}
SyncEngineEvent event(SyncEngineEvent::CLEAR_SERVER_DATA_SUCCEEDED);
« no previous file with comments | « no previous file | chrome/browser/sync/engine/download_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698