There's a bunch of code in chrome/browser/search, chrome/browser/ui/search, and possibly other places, that was either never fully implemented, or has become unused.
Adding bugs for more dead omnibox/search code. These are nominally assigned to groby at the moment but I'm pretty sure they're effectively unowned since I've harassed her a number of times about them and nothing has ever happened :)
No, somehow I hadn't seen that one, thanks!
I have already removed a bunch of embeddedSearch APIs under bug 628207 . I'll double-check if there's more that can go (but as always, no guarantees on when I'll get to it).
Next order of business: Get rid of the notion of "Instant support".
This was meant to express whether a given page is aware of and wants to use the various embeddedSearch APIs (which boils down to this script:
https://cs.chromium.org/chromium/src/chrome/renderer/searchbox/searchbox_extension.cc?rcl=c41d3c785c5179a38e54c6c80ea63d56cc7cfd12&l=233). This notion is no longer necessary or useful: Today, only NTPs can ever have Instant support, and for all practical purposes, they always do.
(There could in theory be third-party NTPs without Instant support, but even then there's no real reason to deny them access to the embeddedSearch APIs. In fact, some third-party NTPs today have to work around Chrome's broken Instant support detection to get access to the mostVisited APIs.)
There's a *lot* of plumbing in place to determine the Instant support and to keep it updated when the page navigates or the active tab changes etc. Let's rip it all out.
Thanks for the heads-up! I usually try the Bing NTP (the only third-party NTP that's readily available around here); once I'm done with this series of CLs, I'll give you a heads-up so you can try with Yandex too. :)
Thanks.
Do you happen to know if TemplateURLData::search_terms_replacement_key param is really used by any Instant code? I could not find any usage of it and I have gone through a lot of pains to fix bugs caused by its replacement inside TemplateUrl constructor.
https://cs.chromium.org/chromium/src/components/search_engines/template_url.cc?l=1167
Its declared here: https://cs.chromium.org/chromium/src/components/search_engines/template_url_data.h?l=142
Looking at the script kSupportsInstantScript - actually it was the first problem that I had to analyze, looking why our NTP was not working in Chromium at first version.
It did not implemented embeddedSearch.searchBox.onsubmit handler :)
I don't *think* that param is still used. It was used in the first iteration of Instant, which showed search terms instead of a "google.com/search?q=..." URL in the Omnibox. That feature has been gone for a loong time, but it's hard to be completely sure the param isn't still used for something else somewhere. I'll continue chipping away at this, and hopefully get to a point where it can be removed sometime.
BTW, kSupportsInstantScript will hopefully be gone soon, see https://codereview.chromium.org/2852693002
Thanks!
About remote NTPs: No - Google's implementation of a remote NTP will likely go away soonish, but there are no plans to remove support for third-party (remote) NTPs.
Let's consider this one done. There are some small remaining parts which are tracked in bug 476079 , and we could consider #ifdef'ing out more of the code on Android, for which I've just filed bug 787830 .
Comment 1 by bugdroid1@chromium.org
, Jul 13 2016