commit | 2d22ecaf03c5c971d21901a6db9198f9ce2e8e36 | [log] [tgz] |
---|---|---|
author | Mikel Astiz <mastiz@chromium.org> | Wed Jul 24 15:03:02 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 24 15:03:02 2024 |
tree | 5a231e6845d342b47070a241f6e2419f76dc9e9b | |
parent | 0a71966f942a020f046398669acb8d39508e584b [diff] |
[sync] Fix batch uploader's behavior during ongoing migrations If the migration of local data is triggered via `SyncService::TriggerLocalDataMigration()`, the likely outcome is that local data will become empty for the selected datatypes. However, the actual migration (moving data from local storage to account storage) is asynchronous for passwords, as it involves and asynchronous read before issuing the writes. This holds true on all platforms but is specially noticeable on Android, where those reads could take longer. During this asynchronous process, if `SyncService::GetLocalDataDescriptions()` is invoked, it is most sensible to assume that no local data is available (it is about to be migrated). To achieve this behavior, PasswordLocalDataBatchUploader is modified to do nothing (and return empty results) if the APIs are exercised while there is a previous ongoing migration. The same behavior is also ported to the kill-switch codepath in LocalDataMigrationHelper. While doing this, a memory leak is fixed, as LocalDataMigrationHelper::OnRequestComplete() was never invoked before this patch, and the list of requests grew indefinitely. Change-Id: Idc5db376fdaf195dc9191b0b9ad65891efc2909d Bug: 326040498 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5735294 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Reviewed-by: Victor Vianna <victorvianna@google.com> Reviewed-by: Ankush Singh <ankushkush@google.com> Cr-Commit-Position: refs/heads/main@{#1332331}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.