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

Issue 2067723002: [sync] Search engine shortcuts get underscores at the end after sync (Closed)

Created:
4 years, 6 months ago by Patrick Noland
Modified:
4 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sync] Search engine shortcuts get underscores at the end after sync Currently, search engines with matching prepopulate_id are treated as distinct if their keywords don't match. This can cause multiple copies of prepopulated search engines to be created; one copy with the original keyword and another copy with the modified keyword. In the linked bug, the problematic behavior has created a different default search engine on each client. Deleting the non-default on client 1 is an attempt to delete client 2's default. There is sync code that assumes this was a mistake and resurrects the local default by appending an underscore. This CL treats matching prepopulate_id as a conflict, and resolves it in favor of the remote search engine if the local engine isn't yet known to sync and was modified less recently. Note that this won't fix existing clients, whose duplicated engines will be known to sync already. R=pkasting@chromium.org, zea@chromium.org BUG=613108 Committed: https://crrev.com/8ec6ae8d86bc2badeb731ad4d85521d65aceae9c Cr-Commit-Position: refs/heads/master@{#400017}

Patch Set 1 : [sync] Search engine shortcuts get underscores at the end after sync #

Total comments: 23

Patch Set 2 : [sync] Search engine shortcuts get underscores at the end after sync #

Total comments: 5

Patch Set 3 : Added requested comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -22 lines) Patch
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 2 9 chunks +82 lines, -12 lines 0 comments Download
M components/search_engines/template_url_service.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M components/search_engines/template_url_service.cc View 1 2 3 chunks +43 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
Patrick Noland
zea: please look at sync-related code in TemplateURLService::MergeInSyncTemplateURL
4 years, 6 months ago (2016-06-14 18:57:14 UTC) #4
Patrick Noland
pkasting, could you please review the entire CL? Thanks
4 years, 6 months ago (2016-06-14 19:06:48 UTC) #5
Peter Kasting
https://codereview.chromium.org/2067723002/diff/40001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): https://codereview.chromium.org/2067723002/diff/40001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode66 chrome/browser/search_engines/template_url_service_sync_unittest.cc:66: int prepopulate_id = -1) { Nit: Can you do ...
4 years, 6 months ago (2016-06-14 19:21:26 UTC) #6
Nicolas Zea
https://codereview.chromium.org/2067723002/diff/40001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2067723002/diff/40001/components/search_engines/template_url_service.cc#newcode2276 components/search_engines/template_url_service.cc:2276: TemplateURL* conflicting_prepopulated_turl = On 2016/06/14 19:21:26, Peter Kasting wrote: ...
4 years, 6 months ago (2016-06-14 21:19:44 UTC) #7
Patrick Noland
PTAL https://codereview.chromium.org/2067723002/diff/40001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): https://codereview.chromium.org/2067723002/diff/40001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode66 chrome/browser/search_engines/template_url_service_sync_unittest.cc:66: int prepopulate_id = -1) { On 2016/06/14 19:21:26, ...
4 years, 6 months ago (2016-06-14 22:55:24 UTC) #9
Peter Kasting
LGTM https://codereview.chromium.org/2067723002/diff/80001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): https://codereview.chromium.org/2067723002/diff/80001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode2256 chrome/browser/search_engines/template_url_service_sync_unittest.cc:2256: std::unique_ptr<TemplateURL> sync_turl = Nit: Above each group of ...
4 years, 6 months ago (2016-06-14 23:48:40 UTC) #10
Nicolas Zea
lgtm
4 years, 6 months ago (2016-06-15 17:03:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2067723002/100001
4 years, 6 months ago (2016-06-15 21:33:51 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years, 6 months ago (2016-06-15 21:40:35 UTC) #16
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-15 21:40:38 UTC) #17
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 21:44:30 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8ec6ae8d86bc2badeb731ad4d85521d65aceae9c
Cr-Commit-Position: refs/heads/master@{#400017}

Powered by Google App Engine
This is Rietveld 408576698