DescriptionDon't create a sync node when updating an URL that wasn't typed.
TypedUrlChangeProcessor is a HistoryService observer and gets notified
about changes to all addresses, not just typed ones. This means that
when HistoryService::SetPageTitle() is called for a non-typed URL,
TypedUrlChangeProcessor::OnURLsModified() will be triggered and,
consequently, TypedUrlChangeProcessor::CreateOrUpdateSyncNode().
As the name suggests, if the modified node was not previously present
(because it was filtered out by ShouldSyncVisit() in OnURLVisited()),
it would be created.
End effect was that *all* URLs that had their title updated (which means
every page that has a <title> tag) were synced, even if they were not typed.
The solution is to return early in CreateOrUpdateSyncNode() if we detect
that the URL in question has no typed visits.
(Caused by https://codereview.chromium.org/1087773002/)
BUG=
Committed: https://crrev.com/3be1b71d63be98a42c0e98673ff35fcd4fc738ab
Cr-Commit-Position: refs/heads/master@{#329370}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 14 (3 generated)
|