| Index: chrome/browser/sync/sessions/sync_session.cc
|
| diff --git a/chrome/browser/sync/sessions/sync_session.cc b/chrome/browser/sync/sessions/sync_session.cc
|
| index f399d7d7904ed1fee8a5425a8641cfaaab04675e..4dcc17ddcf5ba131bdc9d7d7c3e74b22c5f3367e 100644
|
| --- a/chrome/browser/sync/sessions/sync_session.cc
|
| +++ b/chrome/browser/sync/sessions/sync_session.cc
|
| @@ -141,7 +141,26 @@ bool SyncSession::HasMoreToSync() const {
|
| status->conflicts_resolved();
|
| // Or, we have conflicting updates, but we're making progress on
|
| // resolving them...
|
| - }
|
| +}
|
| +
|
| +bool SyncSession::FailedToMakeProgress() const {
|
| + const StatusController* status = status_controller_.get();
|
| +
|
| + // In the future, we should be able to report more about the cause of the
|
| + // errors and return an enum value. Right now that's not possible because
|
| + // our error detection is based on state that can tell us only that an
|
| + // error exists, but not much else.
|
| +
|
| + // We were unable to download all updates, for some unknown reason.
|
| + if (status->num_server_changes_remaining() > 0)
|
| + return true;
|
| +
|
| + // There are many possible causes for this.
|
| + if (status->error().consecutive_errors > 0)
|
| + return true;
|
| +
|
| + return false;
|
| +}
|
|
|
| } // namespace sessions
|
| } // namespace browser_sync
|
|
|