New issue
Advanced search Search tips

Issue 698407 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

MD Settings: search-engines-changed event sometimes fires twice

Project Member Reported by dpa...@chromium.org, Mar 3 2017

Issue description

This is not causing a user visible bug, AFAIK, but it does cause unnecessary work to be performed both in C++ and JS (and also happens in old Options). Explaining below:

 - SearchEnginesHandler is an observer of TemplateURLTableModel, see [1].   
 - When the user changes the default search engine to another one, the onItemsChanged() observer callback is fired twice, once for the previous default engine and once for the new one, see [2].
 - Upon receiving this notification, SearchEnginesHandler blindly fires a new 'search-engines-changed' event to the UI.

[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/search_engines_handler.cc?l=137
[2] https://cs.chromium.org/chromium/src/chrome/browser/ui/search_engines/template_url_table_model.cc?l=343,346
[3] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/search_engines_handler.cc?l=207

I could not find a good way of filtering out one of the two calls, since the same onItemsChanged() callback is fired when any search engine is edited.
 

Comment 1 by dbeam@chromium.org, Mar 6 2017

Labels: -Pri-2 -Hotlist Hotlist-MD-Settings-SearchEngines Pri-3
Status: Available (was: Untriaged)

Comment 2 by dpa...@chromium.org, May 18 2017

Labels: OS-All
Project Member

Comment 3 by sheriffbot@chromium.org, May 21 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment