Revert of Don't create a sync node when updating an URL that wasn't typed. (patchset...
commitebb18035affaa9555dd56e0ac9ab1daf61c64916
authorpneubeck <pneubeck@chromium.org>
Tue, 12 May 2015 13:17:34 +0000 (12 06:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 13:17:41 +0000 (12 13:17 +0000)
treeac98877e1dd7eda9c77af16cc53b8e604b12f230
parent3d20a9d06d9dda27e069d07e9eb358a44633ca1c
Revert of Don't create a sync node when updating an URL that wasn't typed. (patchset #1 id:1 of https://codereview.chromium.org/1126633005/)

Reason for revert:
Suspected to cause failure of
MigrationSingleClientTest.AllTypesIndividually
on Linux GN:

https://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/28301

Original issue's description:
> Don'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}

TBR=maniscalco@chromium.org,pvalenzuela@chromium.org,mpawlowski@opera.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1127353004

Cr-Commit-Position: refs/heads/master@{#329396}
chrome/browser/sync/glue/typed_url_change_processor.cc
chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
chrome/browser/sync/test/integration/typed_urls_helper.cc
chrome/browser/sync/test/integration/typed_urls_helper.h