Commit 42484004 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

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: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805489}
parent f0eb5c25
......@@ -59,6 +59,9 @@ 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
......@@ -1855,8 +1858,12 @@ void ProfileSyncService::StopAndClear() {
// away or it treats all "Cancel the confirmation" cases?
if (!user_settings_->IsSyncRequested()) {
StopImpl(CLEAR_DATA);
// Try to start up again (in transport-only mode).
startup_controller_->TryStart(/*force_immediate=*/true);
// 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);
}
return;
}
......
......@@ -413,7 +413,8 @@ TEST_F(ProfileSyncServiceStartupTest, DisableSync) {
// mode. It should immediately start up again in transport mode.
SetUpFakeSyncEngine();
data_type_manager = SetUpDataTypeManagerMock();
EXPECT_CALL(*data_type_manager, Configure(_, _));
// TODO(crbug.com/1082267, crbug.com/1120899): Reinstate this expectation.
// 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