Commit 5148351b authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Sync: Tiny cleanup in ServerConnectionManager

This removes one entry of the ServerConnectionCode enum which is unused,
and removes an obsolete TODO.

Bug: none
Change-Id: I19a6653d30fc8f6c2bfd7d7d45c6a7a57f6f0473
Reviewed-on: https://chromium-review.googlesource.com/c/1290951Reviewed-by: default avatarvitaliii <vitaliii@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601118}
parent 44f1d18a
...@@ -48,7 +48,6 @@ const char* HttpResponse::GetServerConnectionCodeString( ...@@ -48,7 +48,6 @@ const char* HttpResponse::GetServerConnectionCodeString(
ENUM_CASE(SYNC_SERVER_ERROR); ENUM_CASE(SYNC_SERVER_ERROR);
ENUM_CASE(SYNC_AUTH_ERROR); ENUM_CASE(SYNC_AUTH_ERROR);
ENUM_CASE(SERVER_CONNECTION_OK); ENUM_CASE(SERVER_CONNECTION_OK);
ENUM_CASE(RETRY);
} }
NOTREACHED(); NOTREACHED();
return ""; return "";
......
...@@ -43,26 +43,15 @@ struct HttpResponse { ...@@ -43,26 +43,15 @@ struct HttpResponse {
IO_ERROR, IO_ERROR,
// SYNC_SERVER_ERROR is returned when the HTTP status code indicates that // SYNC_SERVER_ERROR is returned when the HTTP status code indicates that
// a non-auth error has occured. // a non-auth error has occurred.
SYNC_SERVER_ERROR, SYNC_SERVER_ERROR,
// SYNC_AUTH_ERROR is returned when the HTTP status code indicates that an // SYNC_AUTH_ERROR is returned when the HTTP status code indicates that an
// auth error has occured (i.e. a 401 or sync-specific AUTH_INVALID // auth error has occurred (i.e. a 401).
// response)
// TODO(tim): Caring about AUTH_INVALID is a layering violation. But
// this app-specific logic is being added as a stable branch hotfix so
// minimal changes prevail for the moment. Fix this! Bug 35060.
SYNC_AUTH_ERROR, SYNC_AUTH_ERROR,
// SERVER_CONNECTION_OK is returned when request was handled correctly. // SERVER_CONNECTION_OK is returned when request was handled correctly.
SERVER_CONNECTION_OK, SERVER_CONNECTION_OK,
// RETRY is returned when a Commit request fails with a RETRY response from
// the server.
//
// TODO(idana): the server no longer returns RETRY so we should remove this
// value.
RETRY,
}; };
// The HTTP Status code. // The HTTP Status code.
......
...@@ -93,8 +93,6 @@ SyncerError ServerConnectionErrorAsSyncerError( ...@@ -93,8 +93,6 @@ SyncerError ServerConnectionErrorAsSyncerError(
return SYNC_SERVER_ERROR; return SYNC_SERVER_ERROR;
case HttpResponse::SYNC_AUTH_ERROR: case HttpResponse::SYNC_AUTH_ERROR:
return SYNC_AUTH_ERROR; return SYNC_AUTH_ERROR;
case HttpResponse::RETRY:
return SERVER_RETURN_TRANSIENT_ERROR;
case HttpResponse::SERVER_CONNECTION_OK: case HttpResponse::SERVER_CONNECTION_OK:
case HttpResponse::NONE: case HttpResponse::NONE:
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment