Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Issue 10409002: Make prepopulated-TemplateURL-de-duper heuristic smarter. Instead of blindly preserving the first U… (Closed)

Created:
8 years, 7 months ago by SteveT
Modified:
8 years, 6 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Make prepopulated-TemplateURL-de-duper heuristic smarter. Instead of blindly preserving the first URL we get back from the keyword table, use the default search engine, or the URL that matches the prepopulate keyword, only after that falling back to using the lowest ID. BUG=128216 TEST=unit_tests TemplateURLServiceUtilTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=139300

Patch Set 1 #

Patch Set 2 : Steve's initial changes + tests #

Total comments: 18

Patch Set 3 : merge to TOT + fixes #

Total comments: 2

Patch Set 4 : various comments addressed #

Total comments: 4

Patch Set 5 : nits #

Patch Set 6 : patch leak #

Patch Set 7 : use scopedvector #

Total comments: 1

Patch Set 8 : pointer to scopedvector #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -61 lines) Patch
A chrome/browser/search_engines/template_url_service_util_unittest.cc View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/util.h View 1 2 3 4 5 6 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/search_engines/util.cc View 1 2 3 4 5 6 7 9 chunks +109 lines, -60 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
SteveT
Hey Peter, I've ensured that the first patchset is your original code, and the second ...
8 years, 7 months ago (2012-05-17 13:34:54 UTC) #1
SteveT
One more comment inline. I've merged and fixed merge issues with my PreSyncDelete patch. http://codereview.chromium.org/10409002/diff/9002/chrome/browser/search_engines/util.cc ...
8 years, 7 months ago (2012-05-17 15:01:45 UTC) #2
Peter Kasting
https://chromiumcodereview.appspot.com/10409002/diff/4002/chrome/browser/search_engines/template_url_service_util_unittest.cc File chrome/browser/search_engines/template_url_service_util_unittest.cc (right): https://chromiumcodereview.appspot.com/10409002/diff/4002/chrome/browser/search_engines/template_url_service_util_unittest.cc#newcode43 chrome/browser/search_engines/template_url_service_util_unittest.cc:43: local_turls.push_back(CreatePrepopulateTemplateURL(0, "winner3", 6)); If after this block you add ...
8 years, 7 months ago (2012-05-17 20:12:17 UTC) #3
SteveT
Okay, I believe I've addressed everything. PTAL and let me know if there is anything ...
8 years, 7 months ago (2012-05-17 21:27:22 UTC) #4
Peter Kasting
LGTM http://codereview.chromium.org/10409002/diff/13001/chrome/browser/search_engines/template_url_service_util_unittest.cc File chrome/browser/search_engines/template_url_service_util_unittest.cc (right): http://codereview.chromium.org/10409002/diff/13001/chrome/browser/search_engines/template_url_service_util_unittest.cc#newcode47 chrome/browser/search_engines/template_url_service_util_unittest.cc:47: Nit: Unnecessary newline http://codereview.chromium.org/10409002/diff/13001/chrome/browser/search_engines/template_url_service_util_unittest.cc#newcode73 chrome/browser/search_engines/template_url_service_util_unittest.cc:73: EXPECT_EQ(local_turls.size(), Nit: This ...
8 years, 7 months ago (2012-05-18 23:03:38 UTC) #5
SteveT
Hey Peter - wanted your opinion on my latest patchset. Your change pulls the retrieval ...
8 years, 7 months ago (2012-05-20 13:30:14 UTC) #6
Peter Kasting
Using scoping objects if possible is always good.
8 years, 7 months ago (2012-05-21 18:07:25 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10409002/11
8 years, 7 months ago (2012-05-24 17:40:12 UTC) #8
Peter Kasting
https://chromiumcodereview.appspot.com/10409002/diff/11/chrome/browser/search_engines/util.cc File chrome/browser/search_engines/util.cc (right): https://chromiumcodereview.appspot.com/10409002/diff/11/chrome/browser/search_engines/util.cc#newcode144 chrome/browser/search_engines/util.cc:144: ScopedVector<TemplateURL>& prepopulated_urls, Nit: Google style prohibits non-const refs; pass ...
8 years, 7 months ago (2012-05-24 17:43:53 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10409002/22002
8 years, 6 months ago (2012-05-29 14:41:30 UTC) #10
commit-bot: I haz the power
8 years, 6 months ago (2012-05-29 15:58:27 UTC) #11
Change committed as 139300

Powered by Google App Engine
This is Rietveld 408576698