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

Issue 2659353002: Fix TemplateUrl::MatchesData comparison of search_terms_replacement_key (reland) (Closed)

Created:
3 years, 10 months ago by Alexander Yashkin
Modified:
3 years, 10 months ago
Reviewers:
vasilii, Peter Kasting
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix TemplateUrl::MatchesData comparison of search_terms_replacement_key (reland) Also fixed linked bug in TemplateURLService::RepairPrepopulatedEngines which started to reproduce after first fix. This is reland of https://codereview.chromium.org/2516963002 and https://codereview.chromium.org/2524733008. "Current TemplateUrl constructor performs replacement of search_terms_replacement_key field after initialization from TemplateURLData. This replacement was not handled correctly in TemplateUrl::MatchesData function. As result, TemplateUrl created from TemplateUrlData for google engine could not be matched to its own source data." Also fixed linked bug in TemplateURLService::RepairPrepopulatedEngines - after RepairPrepopulatedEngines sync guid preference was not updated correctly. R=pkasting@chromium.org, vasilii@chromium.org BUG=686399 TEST=Ensure that https://bugs.chromium.org/p/chromium/issues/detail?id=680197 and https://bugs.chromium.org/p/chromium/issues/detail?id=690345 are fixed. Review-Url: https://codereview.chromium.org/2659353002 Cr-Commit-Position: refs/heads/master@{#450937} Committed: https://chromium.googlesource.com/chromium/src/+/02d3f50b4f9429a499eb1604bf315f0ce03163a1

Patch Set 1 #

Patch Set 2 : Fixed TemplateUrlService not updating sync guid after Repair #

Total comments: 15

Patch Set 3 : Added another test for RepairPrepopulatedSearchEngines #

Total comments: 20

Patch Set 4 : Fixed after review #

Total comments: 2

Patch Set 5 : Fixed after review, remove redundant check #

Total comments: 3

Patch Set 6 : Fixed after review round 3 #

Total comments: 33

Patch Set 7 : Fixed after review, round 4 #

Total comments: 11

Patch Set 8 : Fixed after review, round 5 #

Total comments: 4

Patch Set 9 : Fixed after review, round 6 #

Patch Set 10 : Fixed deps #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -32 lines) Patch
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 2 3 4 5 6 7 4 chunks +177 lines, -0 lines 0 comments Download
M components/google/core/browser/google_util.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M components/search_engines/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/search_engines/default_search_manager.h View 1 2 3 4 5 6 2 chunks +11 lines, -2 lines 0 comments Download
M components/search_engines/default_search_manager.cc View 1 2 3 4 5 6 5 chunks +9 lines, -5 lines 0 comments Download
M components/search_engines/default_search_manager_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/search_engines/template_url.cc View 1 2 3 4 5 6 4 chunks +29 lines, -20 lines 0 comments Download
M components/search_engines/template_url_service.cc View 1 2 3 4 5 6 7 8 4 chunks +23 lines, -4 lines 0 comments Download
M components/search_engines/template_url_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +42 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (21 generated)
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc#newcode1952 components/search_engines/template_url_service.cc:1952: default_search_provider_source_ = source; Problem in https://bugs.chromium.org/p/chromium/issues/detail?id=680197 arise due to ...
3 years, 10 months ago (2017-01-30 11:48:32 UTC) #1
Peter Kasting
(Re-sending) This looks like a re-fix for the problem you fixed before, where the fix ...
3 years, 10 months ago (2017-01-30 12:08:23 UTC) #2
Alexander Yashkin
On 2017/01/30 at 12:08:23, pkasting wrote: > (Re-sending) > > This looks like a re-fix ...
3 years, 10 months ago (2017-01-30 13:35:04 UTC) #3
Alexander Yashkin
Added another unittest to highlight problem described in third item above. Without my changes in ...
3 years, 10 months ago (2017-01-30 19:59:23 UTC) #4
Peter Kasting
LGTM https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url.cc File components/search_engines/template_url.cc (right): https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url.cc#newcode179 components/search_engines/template_url.cc:179: return search_terms_replacement_key1 == search_terms_replacement_key2; Nit: This implementation is ...
3 years, 10 months ago (2017-02-02 00:04:27 UTC) #6
vasilii
How is everything happening in template_url_service.cc related to the CL description.
3 years, 10 months ago (2017-02-02 14:57:05 UTC) #7
Alexander Yashkin
On 2017/02/02 at 14:57:05, vasilii wrote: > How is everything happening in template_url_service.cc related to ...
3 years, 10 months ago (2017-02-02 15:06:46 UTC) #8
vasilii
On 2017/02/02 15:06:46, Alexander Yashkin wrote: > On 2017/02/02 at 14:57:05, vasilii wrote: > > ...
3 years, 10 months ago (2017-02-02 15:23:57 UTC) #9
Alexander Yashkin
On 2017/02/02 at 15:23:57, vasilii wrote: > On 2017/02/02 15:06:46, Alexander Yashkin wrote: > > ...
3 years, 10 months ago (2017-02-03 09:10:34 UTC) #12
Alexander Yashkin
> Is it possible to fix 680197 first and then land this one? If not, ...
3 years, 10 months ago (2017-02-03 09:15:16 UTC) #13
vasilii
https://codereview.chromium.org/2659353002/diff/60001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/60001/components/search_engines/template_url_service.cc#newcode694 components/search_engines/template_url_service.cc:694: ApplyDefaultSearchChange(new_dse, source); I can't correlate your changes with https://bugs.chromium.org/p/chromium/issues/detail?id=680197#c24 ...
3 years, 10 months ago (2017-02-03 13:13:57 UTC) #18
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url.cc File components/search_engines/template_url.cc (right): https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url.cc#newcode179 components/search_engines/template_url.cc:179: return search_terms_replacement_key1 == search_terms_replacement_key2; On 2017/02/02 at 00:04:26, Peter ...
3 years, 10 months ago (2017-02-03 14:44:26 UTC) #19
Peter Kasting
https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc#newcode698 components/search_engines/template_url_service.cc:698: DefaultSearchManager::FROM_FALLBACK) { On 2017/02/03 14:44:25, Alexander Yashkin wrote: > ...
3 years, 10 months ago (2017-02-05 05:09:58 UTC) #20
Alexander Yashkin
On 2017/02/05 at 05:09:58, pkasting wrote: > https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc > File components/search_engines/template_url_service.cc (right): > > https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc#newcode698 ...
3 years, 10 months ago (2017-02-05 13:54:12 UTC) #21
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/20001/components/search_engines/template_url_service.cc#newcode698 components/search_engines/template_url_service.cc:698: DefaultSearchManager::FROM_FALLBACK) { On 2017/02/05 at 05:09:58, Peter Kasting wrote: ...
3 years, 10 months ago (2017-02-05 13:57:04 UTC) #22
vasilii
https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc#newcode685 components/search_engines/template_url_service.cc:685: // If the default search provider came from a ...
3 years, 10 months ago (2017-02-07 14:45:37 UTC) #23
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc#newcode685 components/search_engines/template_url_service.cc:685: // If the default search provider came from a ...
3 years, 10 months ago (2017-02-07 16:26:23 UTC) #24
vasilii
https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc#newcode695 components/search_engines/template_url_service.cc:695: } else if (old_source == DefaultSearchManager::FROM_USER) { Your reasoning ...
3 years, 10 months ago (2017-02-07 17:12:56 UTC) #25
Alexander Yashkin
On 2017/02/07 at 17:12:56, vasilii wrote: > https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc > File components/search_engines/template_url_service.cc (right): > > https://codereview.chromium.org/2659353002/diff/80001/components/search_engines/template_url_service.cc#newcode695 ...
3 years, 10 months ago (2017-02-09 08:15:11 UTC) #26
vasilii
I think this CL will fix both bugs.
3 years, 10 months ago (2017-02-09 14:24:34 UTC) #27
Alexander Yashkin
On 2017/02/09 at 14:24:34, vasilii wrote: > I think this CL will fix both bugs. ...
3 years, 10 months ago (2017-02-09 14:44:59 UTC) #28
vasilii
Sync will work when there are some policies. Some settings will be controlled on the ...
3 years, 10 months ago (2017-02-09 16:06:39 UTC) #29
Alexander Yashkin
On 2017/02/09 at 16:06:39, vasilii wrote: > Sync will work when there are some policies. ...
3 years, 10 months ago (2017-02-10 16:34:35 UTC) #30
Alexander Yashkin
On 2017/02/10 at 16:34:35, Alexander Yashkin wrote: > On 2017/02/09 at 16:06:39, vasilii wrote: > ...
3 years, 10 months ago (2017-02-10 16:46:30 UTC) #32
vasilii
https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode192 chrome/browser/search_engines/template_url_service_unittest.cc:192: // Set custom search engine as default through overrides ...
3 years, 10 months ago (2017-02-13 14:37:54 UTC) #37
Peter Kasting
https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode306 chrome/browser/search_engines/template_url_service_unittest.cc:306: auto overrides_list = base::MakeUnique<base::ListValue>(); On 2017/02/13 14:37:54, vasilii wrote: ...
3 years, 10 months ago (2017-02-13 22:24:57 UTC) #38
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2659353002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode192 chrome/browser/search_engines/template_url_service_unittest.cc:192: // Set custom search engine as default through overrides ...
3 years, 10 months ago (2017-02-14 12:04:44 UTC) #39
Peter Kasting
https://codereview.chromium.org/2659353002/diff/100001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/100001/components/search_engines/template_url_service.cc#newcode707 components/search_engines/template_url_service.cc:707: fallback_engine->sync_guid()); On 2017/02/14 12:04:43, Alexander Yashkin wrote: > On ...
3 years, 10 months ago (2017-02-15 02:09:57 UTC) #40
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/100001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2659353002/diff/100001/components/search_engines/template_url_service.cc#newcode707 components/search_engines/template_url_service.cc:707: fallback_engine->sync_guid()); On 2017/02/15 at 02:09:57, Peter Kasting wrote: > ...
3 years, 10 months ago (2017-02-15 12:46:10 UTC) #41
Peter Kasting
LGTM https://codereview.chromium.org/2659353002/diff/120001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2659353002/diff/120001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode314 chrome/browser/search_engines/template_url_service_unittest.cc:314: On 2017/02/15 12:46:10, Alexander Yashkin wrote: > On ...
3 years, 10 months ago (2017-02-16 00:12:11 UTC) #42
Alexander Yashkin
https://codereview.chromium.org/2659353002/diff/120001/components/search_engines/template_url_unittest.cc File components/search_engines/template_url_unittest.cc (right): https://codereview.chromium.org/2659353002/diff/120001/components/search_engines/template_url_unittest.cc#newcode1893 components/search_engines/template_url_unittest.cc:1893: "?{google:instantExtendedEnabledKey}&q={searchTerms}"); On 2017/02/16 at 00:12:10, Peter Kasting wrote: > ...
3 years, 10 months ago (2017-02-16 07:26:30 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2659353002/160001
3 years, 10 months ago (2017-02-16 07:27:10 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/154684)
3 years, 10 months ago (2017-02-16 07:36:00 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2659353002/180001
3 years, 10 months ago (2017-02-16 08:10:37 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/367770)
3 years, 10 months ago (2017-02-16 10:30:27 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2659353002/180001
3 years, 10 months ago (2017-02-16 11:08:55 UTC) #55
commit-bot: I haz the power
3 years, 10 months ago (2017-02-16 12:04:46 UTC) #58
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/02d3f50b4f9429a499eb1604bf31...

Powered by Google App Engine
This is Rietveld 408576698