Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 1126633005: Don't create a sync node when updating an URL that wasn't typed. (Closed)

Created:
5 years, 7 months ago by mpawlowski
Modified:
5 years, 7 months ago
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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}

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -1 line) Patch
M chrome/browser/sync/glue/typed_url_change_processor.cc View 1 chunk +8 lines, -0 lines 2 comments Download
M chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc View 1 chunk +38 lines, -0 lines 1 comment Download
M chrome/browser/sync/test/integration/typed_urls_helper.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/integration/typed_urls_helper.cc View 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
mpawlowski
Fixing my regression :(
5 years, 7 months ago (2015-05-05 11:17:28 UTC) #2
mpawlowski
bump?
5 years, 7 months ago (2015-05-08 09:05:03 UTC) #3
pval...(no longer on Chromium)
zea is out until May 19. I've added maniscalco@ for the glue code review. from ...
5 years, 7 months ago (2015-05-08 17:26:23 UTC) #5
maniscalco
LGTM % one question... https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc File chrome/browser/sync/glue/typed_url_change_processor.cc (right): https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc#newcode160 chrome/browser/sync/glue/typed_url_change_processor.cc:160: if (std::find_if(visit_vector.begin(), visit_vector.end(), Question about ...
5 years, 7 months ago (2015-05-08 19:38:00 UTC) #6
mpawlowski
https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc File chrome/browser/sync/glue/typed_url_change_processor.cc (right): https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc#newcode160 chrome/browser/sync/glue/typed_url_change_processor.cc:160: if (std::find_if(visit_vector.begin(), visit_vector.end(), On 2015/05/08 19:38:00, maniscalco wrote: > ...
5 years, 7 months ago (2015-05-11 09:27:18 UTC) #7
maniscalco
On 2015/05/11 09:27:18, mpawlowski wrote: > https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc > File chrome/browser/sync/glue/typed_url_change_processor.cc (right): > > https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc#newcode160 > ...
5 years, 7 months ago (2015-05-11 16:48:09 UTC) #8
mpawlowski
On 2015/05/11 16:48:09, maniscalco wrote: > On 2015/05/11 09:27:18, mpawlowski wrote: > > > https://codereview.chromium.org/1126633005/diff/1/chrome/browser/sync/glue/typed_url_change_processor.cc ...
5 years, 7 months ago (2015-05-12 07:07:52 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1126633005/1
5 years, 7 months ago (2015-05-12 07:09:31 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-12 07:57:02 UTC) #12
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/3be1b71d63be98a42c0e98673ff35fcd4fc738ab Cr-Commit-Position: refs/heads/master@{#329370}
5 years, 7 months ago (2015-05-12 07:57:58 UTC) #13
pneubeck (no reviews)
5 years, 7 months ago (2015-05-12 13:16:20 UTC) #14
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/1127353004/ by pneubeck@chromium.org.

The reason for reverting is: Suspected to cause failure of
MigrationSingleClientTest.AllTypesIndividually
on Linux GN:

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

Powered by Google App Engine
This is Rietveld 408576698