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

Issue 12084076: Ensure post-sync TemplateURL of prepopulated engines use built-in version. (Closed)

Created:
7 years, 10 months ago by beaudoin
Modified:
7 years, 10 months ago
Reviewers:
SteveT, Peter Kasting
CC:
chromium-reviews
Visibility:
Public.

Description

This patch ensures that whenever a sync operation in TemplateURLService adds or updates a TemplateURL corresponding to a prepopulated engine, the latest built-in version of the prepopulated engine data is used. We also bump the the version number of prepopulated_engines.json to fix currently broken databases. BUG=171350 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180627

Patch Set 1 : #

Total comments: 7

Patch Set 2 : Revised approach, see bug description #

Total comments: 1

Patch Set 3 : Only merge with prepopulated engines during sync. #

Patch Set 4 : Including unit tests. #

Patch Set 5 : Small correction to tests. #

Total comments: 8

Patch Set 6 : Changed according to stevet comments. #

Total comments: 8

Patch Set 7 : Change according to pkasting comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -28 lines) Patch
M chrome/browser/search_engines/prepopulated_engines.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_service.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.cc View 1 2 3 4 5 6 4 chunks +30 lines, -5 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 2 3 4 5 6 4 chunks +158 lines, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.h View 1 2 3 1 chunk +12 lines, -8 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.cc View 1 2 3 4 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 2 3 9 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/search_engines/util.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/util.cc View 1 2 3 2 chunks +15 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
beaudoin
Hey Peter. This implements the fix we discussed on issue 171350, if you could just ...
7 years, 10 months ago (2013-01-30 22:11:29 UTC) #1
Peter Kasting
No tests. Can we write a test? https://codereview.chromium.org/12084076/diff/4001/chrome/browser/search_engines/template_url_prepopulate_data.cc File chrome/browser/search_engines/template_url_prepopulate_data.cc (right): https://codereview.chromium.org/12084076/diff/4001/chrome/browser/search_engines/template_url_prepopulate_data.cc#newcode1217 chrome/browser/search_engines/template_url_prepopulate_data.cc:1217: if (engine ...
7 years, 10 months ago (2013-01-30 22:32:33 UTC) #2
beaudoin
Modified my approach because of the multiple-engines-share-the-same-id problem (see bug description). I'm not 100% satisfied ...
7 years, 10 months ago (2013-02-01 21:12:38 UTC) #3
Peter Kasting
I agree with you that the efficiency seems a bit low. I think the core ...
7 years, 10 months ago (2013-02-01 22:47:06 UTC) #4
beaudoin
Moved the prepopulated engine merge to sync-only. Also bumped the version number of prepopulated_engines.json since ...
7 years, 10 months ago (2013-02-02 00:02:28 UTC) #5
beaudoin
Here's the version with the tests, PTAL.
7 years, 10 months ago (2013-02-02 04:03:36 UTC) #6
beaudoin
+stevet for comments on unit tests.
7 years, 10 months ago (2013-02-04 17:24:04 UTC) #7
SteveT
Looking good. A few things inline. Thanks! https://codereview.chromium.org/12084076/diff/25001/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/12084076/diff/25001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode229 chrome/browser/search_engines/template_url_service_sync_unittest.cc:229: // the ...
7 years, 10 months ago (2013-02-04 19:00:18 UTC) #8
beaudoin
https://codereview.chromium.org/12084076/diff/25001/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/12084076/diff/25001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode229 chrome/browser/search_engines/template_url_service_sync_unittest.cc:229: // the |url| and |guid|. The caller owns the ...
7 years, 10 months ago (2013-02-04 20:01:31 UTC) #9
Peter Kasting
Are all the search_terms_replacement_key changes meant to go in this CL? Your description doesn't mention ...
7 years, 10 months ago (2013-02-04 20:35:32 UTC) #10
SteveT
https://codereview.chromium.org/12084076/diff/20002/chrome/browser/search_engines/template_url_service.cc File chrome/browser/search_engines/template_url_service.cc (right): https://codereview.chromium.org/12084076/diff/20002/chrome/browser/search_engines/template_url_service.cc#newcode1322 chrome/browser/search_engines/template_url_service.cc:1322: UpdateTemplateURLIfPrepopulated(turl, profile); At first glance, I don't believe this ...
7 years, 10 months ago (2013-02-04 21:05:44 UTC) #11
Peter Kasting
https://codereview.chromium.org/12084076/diff/20002/chrome/browser/search_engines/template_url_service.cc File chrome/browser/search_engines/template_url_service.cc (right): https://codereview.chromium.org/12084076/diff/20002/chrome/browser/search_engines/template_url_service.cc#newcode1322 chrome/browser/search_engines/template_url_service.cc:1322: UpdateTemplateURLIfPrepopulated(turl, profile); On 2013/02/04 21:05:44, SteveT wrote: > However, ...
7 years, 10 months ago (2013-02-04 21:40:08 UTC) #12
beaudoin
I've discussed this offline with Steve and we agree with you that we must _not_ ...
7 years, 10 months ago (2013-02-04 22:33:40 UTC) #13
Peter Kasting
LGTM https://codereview.chromium.org/12084076/diff/20002/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/12084076/diff/20002/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode234 chrome/browser/search_engines/template_url_service_sync_unittest.cc:234: time_t last_mod = 100); On 2013/02/04 22:33:40, beaudoin ...
7 years, 10 months ago (2013-02-04 23:52:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/12084076/34001
7 years, 10 months ago (2013-02-05 02:19:52 UTC) #15
commit-bot: I haz the power
7 years, 10 months ago (2013-02-05 07:41:50 UTC) #16
Message was sent while issue was closed.
Change committed as 180627

Powered by Google App Engine
This is Rietveld 408576698