-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If there are any behavior changes, they should only happen in code paths where kReplaceSyncPromosWithSignInPromos is disabled, and that code should be deleted soon anyway (the feature is launched). There were 2 kinds of methods left in this service. 1) Wrappers around SyncSetupInProgressHandle: CommitSyncChanges(), HasUncommittedChanges(), PrepareForFirstSyncSetup(). 2) A wrapper around SyncUserSettings::SetInitialSyncFeatureSetupComplete(). Calls to (1) can be further divided in 2 kinds: a) Holding a SyncSetupInProgressHandle before doing SetSyncFeatureRequested() & SetInitialSyncFeatureSetupComplete() [1] -> Calls deleted in this CL. This might cause the sync engine to start a bit earlier but is believed to be harmless. b) Holding a SyncSetupInProgressHandle while showing the data type toggles to syncing users -> Replaced with direct use of SyncSetupInProgressHandle. Calls to (2) are replaced with direct use of SyncUserSettings. The original wrapper had some extra guarding by CanSyncFeatureStart() [2]. I think that predicate is guaranteed to be true in all current callers so I just removed the check. But as mentioned before, even if that's not true, these code paths will be deleted soon anyway. [1] Note: GrantSyncConsent() calls PrepareForFirstSyncSetup(), which holds a SyncSetupInProgressHandle. CommitSyncChanges() releases the handle. https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/ui/authentication/signin/user_signin/user_signin_mediator.mm;l=271-277;drc=0dcaea514c649315fd66232a792c3ae74217ab2d https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/ui/authentication/tangible_sync/tangible_sync_mediator.mm;l=251-260;drc=0dcaea514c649315fd66232a792c3ae74217ab2d [2] ``` if (sync_service_->CanSyncFeatureStart()) { sync_service_->GetUserSettings() ->SetInitialSyncFeatureSetupComplete(source); } ``` Fixed: 40064196 Change-Id: I75bc2b680bfb8dba251a5a242e32387119133913 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374774 Reviewed-by: Mikel Astiz <mastiz@chromium.org> Auto-Submit: Victor Vianna <victorvianna@google.com> Commit-Queue: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Gauthier Ambard <gambard@chromium.org> Cr-Commit-Position: refs/heads/main@{#1276801}
- Loading branch information
Victor Hugo Vianna Silva
authored and
Chromium LUCI CQ
committed
Mar 22, 2024
1 parent
49a2e3b
commit ba627ce
Showing
31 changed files
with
24 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.