Chromium Code Reviews
DescriptionFix extensions sync in cases where items change type
If an extension changes into an app or vice versa, we can be left with
an old sync data item even if the installed item is uninstalled. Then on
the next sync, we'll try re-installing based on the id in this old
record, so it becomes impossible to remove. The chrome webstore does not
normally allow items to change type, but it has happened in a few cases,
possibly either via their publishing API or one-off manual
inteventions. A notable case is Google Hangouts, which started out as a
packaged app and became an extension at some point.
This CL changes the sync logic to always delete the sync data item if
there is an installed item of a differing type. Previously, we only did
this in the special case of themes due to a bug where themes could end
up being recorded as extensions.
Also, while working on tests for this CL I discovered some unit and
browser tests where we were directly calling the ProcessSyncChanges
method on ExtensionSyncService without first calling
MergeDataAndStartSyncing, which is a violation of the expectations of
the SyncableService interface, so I've fixed those and added a DCHECK to
help prevent future occurences.
BUG=590692
Committed: https://crrev.com/e48ab754b00bbb2dee227adebb8936b3b13be77c
Cr-Commit-Position: refs/heads/master@{#380813}
Patch Set 1 #
Total comments: 13
Patch Set 2 : review feedback #
Messages
Total messages: 18 (10 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||