Prevent accidental retries in WifiSyncFeatureManager success callback
The true state of the back-end cannot be determined at the time of success callbacks to cryptauth through DeviceSyncClient because the remote device cache is not yet updated. This caused a second unnecessary network request to be sent out when the success callback was triggered because the back-end state could not be verified. This CL fixes the duplicate network request by changing the success callback function to infer the state of the back-end based on whether the network request attempted to enable or disable wifi sync. Bug: 1117619 Change-Id: Icec19d21954c60a6d90603f346f7136bfd5b3d62 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2439518Reviewed-by:Kyle Horimoto <khorimoto@chromium.org> Reviewed-by:
Jon Mann <jonmann@chromium.org> Commit-Queue: Claude van der Merwe <cvandermerwe@google.com> Cr-Commit-Position: refs/heads/master@{#813164}
Showing
Please register or sign in to comment