New issue
Advanced search Search tips

Issue 686399 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Bug in TemplateUrl::MatchesData function

Project Member Reported by a-...@yandex-team.ru, Jan 28 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.77 YaBrowser/17.1.0.1289 (beta) Yowser/2.5 Safari/537.36

Steps to reproduce the problem:
Current TemplateUrl constructor performs replacement of
search_terms_replacement_key field after initialization from
TemplateURLData. This replacement is 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.

I have already submitted fixes for it 
https://codereview.chromium.org/2516963002/
https://codereview.chromium.org/2524733008

Yet they were reverted because they uncovered another bug in TemplateURLService 
https://bugs.chromium.org/p/chromium/issues/detail?id=680197

Next fix attempt need to take in consideration dependency of TemplateURLService from this bug.

What is the expected behavior?

What went wrong?
None applicable.

Did this work before? Yes I think it was broken in https://chromiumcodereview.appspot.com/11576044

Chrome version: 55.0.2883.77  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0
 
Owner: ellyjo...@chromium.org
Status: Available (was: Unconfirmed)
mac triage here. reporter, do I understand correctly that you're fixing this bug right now? do you have an @chromium.org account I can assign this to? For now I'll assign it to myself.
I am fixing it in https://codereview.chromium.org/2659353002/
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02d3f50b4f9429a499eb1604bf315f0ce03163a1

commit 02d3f50b4f9429a499eb1604bf315f0ce03163a1
Author: a-v-y <a-v-y@yandex-team.ru>
Date: Thu Feb 16 12:03:55 2017

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}

[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/chrome/browser/search_engines/template_url_service_unittest.cc
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/google/core/browser/google_util.h
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/BUILD.gn
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/default_search_manager.cc
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/default_search_manager.h
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/default_search_manager_unittest.cc
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/template_url.cc
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/template_url_service.cc
[modify] https://crrev.com/02d3f50b4f9429a499eb1604bf315f0ce03163a1/components/search_engines/template_url_unittest.cc

Status: Fixed (was: Available)
Assuming this is fixed by the CL in #3.

Sign in to add a comment