SyncService::CanSyncStart: return false after an unrecoverable error
This should make no difference whatsoever in practice (in case of an
unrecoverable error, we won't try to start up again anyway), it just
makes things a bit simpler to reason about.
Bug: 839834
Change-Id: Ie3ac83b172f9fab100b1a176421025aa1f3699dc
Reviewed-on: https://chromium-review.googlesource.com/1138252
Commit-Queue: Marc Treib <[email protected]>
Reviewed-by: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#575355}
diff --git a/components/sync/driver/sync_service.cc b/components/sync/driver/sync_service.cc
index ee753cea..cb0573c 100644
--- a/components/sync/driver/sync_service.cc
+++ b/components/sync/driver/sync_service.cc
@@ -14,13 +14,7 @@
}
bool SyncService::CanSyncStart() const {
- int disable_reasons = GetDisableReasons();
- // An unrecoverable error is currently *not* considered a start-preventing
- // disable reason, because it occurs after Sync has already started.
- // TODO(crbug.com/839834): Consider changing this, since Sync shuts down and
- // won't start up again after an unrecoverable error.
- disable_reasons = disable_reasons & ~DISABLE_REASON_UNRECOVERABLE_ERROR;
- return disable_reasons == DISABLE_REASON_NONE;
+ return GetDisableReasons() == DISABLE_REASON_NONE;
}
bool SyncService::IsSyncAllowed() const {