Commit 1b852c85 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Revert "Sync: don't start up again (in transport mode) after StopAndClear"

This reverts commit 42484004.

Reason for revert: Investigation has concluded, see crbug.com/1120899

Original change's description:
> Sync: don't start up again (in transport mode) after StopAndClear
>
> This is essentially a revert of crrev.com/c/1082267 (undoing the actual
> 1-line change from that CL, but keeping the comment improvements).
> This is a temporary measure to investigate crbug.com/1120899.
>
> Bug: 1120899, 1082267
> Change-Id: I7761418c038824218a7fc36b325f1b364f7bbbe5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401460
> Commit-Queue: Marc Treib <treib@chromium.org>
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#805489}

TBR=treib@chromium.org,mastiz@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1120899
Bug: 1082267
Change-Id: I75e64d1988cc585e2aa344058ac4d50dbb73fd34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438386Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812035}
parent 6f52aa0c
......@@ -60,9 +60,6 @@ namespace syncer {
namespace {
constexpr base::Feature kSyncRestartAfterStopAndClear{
"SyncRestartAfterStopAndClear", base::FEATURE_DISABLED_BY_DEFAULT};
// The initial state of sync, for the Sync.InitialState histogram. Even if
// this value is CAN_START, sync startup might fail for reasons that we may
// want to consider logging in the future, such as a passphrase needed for
......@@ -1876,12 +1873,8 @@ void ProfileSyncService::StopAndClear() {
// away or it treats all "Cancel the confirmation" cases?
if (!user_settings_->IsSyncRequested()) {
StopImpl(CLEAR_DATA);
// TODO(crbug.com/1120899): Doing this might cause some clients to enter a
// persistent error state.
if (base::FeatureList::IsEnabled(kSyncRestartAfterStopAndClear)) {
// Try to start up again (in transport-only mode).
startup_controller_->TryStart(/*force_immediate=*/true);
}
// Try to start up again (in transport-only mode).
startup_controller_->TryStart(/*force_immediate=*/true);
return;
}
......
......@@ -413,8 +413,7 @@ TEST_F(ProfileSyncServiceStartupTest, DisableSync) {
// mode. It should immediately start up again in transport mode.
SetUpFakeSyncEngine();
data_type_manager = SetUpDataTypeManagerMock();
// TODO(crbug.com/1082267, crbug.com/1120899): Reinstate this expectation.
// EXPECT_CALL(*data_type_manager, Configure(_, _));
EXPECT_CALL(*data_type_manager, Configure(_, _));
sync_service()->StopAndClear();
}
......
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