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

Revert "Sync: Clean up remaining site of unnecessary deferred startup"

This reverts commit dfb96619.

Reason for revert: Likely made some Android tests flaky, see crbug.com/1115258

Original change's description:
> Sync: Clean up remaining site of unnecessary deferred startup
> 
> Followup to https://crrev.com/c/1989533
> 
> Sync supports delaying the engine startup by 10 seconds. This is meant
> for avoiding contention during browser startup.
> Before this CL, the 10-second delay would also apply in one other
> (rare) situation, for no good reason other than some tests depending on
> this behavior. Two of these tests were recently fixed (in
> crrev.com/c/2339986), and the one remaining one is fixed in this CL.
> With that, the delayed startup can now go away!
> 
> Bug: 1035874
> Change-Id: I865d0bc3caac4d8f0712489ccbad526f912ccdce
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343036
> Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
> Commit-Queue: Marc Treib <treib@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#796819}

TBR=treib@chromium.org,mmoskvitin@google.com

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

Bug: 1035874, 1115258
Change-Id: Idde272bf1bd4325160346bd5d74c49bdf3f384a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352909Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797336}
parent fc05b522
......@@ -442,14 +442,10 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, ClearsPrefsIfClearData) {
SetupTest(/*all_types_enabled=*/true);
SyncPrefs prefs(GetProfile(0)->GetPrefs());
const std::string initial_cache_guid = prefs.GetCacheGuid();
ASSERT_NE("", initial_cache_guid);
ASSERT_NE("", prefs.GetCacheGuid());
GetClient(0)->StopSyncServiceAndClearData();
// After "stop and clear", the SyncService may immediately start up again in
// transport-only mode, creating a new cache GUID. So the cache GUID may be
// non-empty now, but it must be different from the previous one.
EXPECT_NE(initial_cache_guid, prefs.GetCacheGuid());
EXPECT_EQ("", prefs.GetCacheGuid());
}
IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest,
......
......@@ -1567,7 +1567,12 @@ void ProfileSyncService::OnSyncRequestedPrefChange(bool is_sync_requested) {
}
// Try to start up again (in transport-only mode).
startup_controller_->TryStart(/*force_immediate=*/true);
// TODO(crbug.com/1035874): There's no real need to delay the startup here,
// i.e. it should be fine to set force_immediate to true. However currently
// some tests depend on the startup *not* happening immediately (because
// they want to check that Sync (the feature) got disabled, which is hard to
// do if the engine starts up again immediately).
startup_controller_->TryStart(/*force_immediate=*/false);
}
}
......
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