New issue
Advanced search Search tips

Issue 737775 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Omnibox - Delete Broken Auto-Generated Custom Search Engines

Project Member Reported by mpear...@chromium.org, Jun 28 2017

Issue description


Yesterday, as happens every so often for me, I invoke a custom search engine and get to a 404 page.  A developer redesigned their web site and the old custom search engine doesn't work anymore.  Often I'm too lazy to go delete the custom search engine, or optimistic that it'll start working again (even though it never does in my experience).

I'd like to delete auto-generated custom search engines (a.k.a. |safe_for_autoreplace|) if the search resulted in a 404.  (No other types of errors, such as network errors, would delete them.)  Maybe some other 4xx codes should also result in deletion.

Separately, I'm planning to regenerate / recreate custom search engines regularly (ref https://bugs.chromium.org/p/chromium/issues/detail?id=611145#c11).  This is an independent proposal.
 
Notes:

Code will need to go in
https://cs.chromium.org/chromium/src/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h

On the right type of failed navigations, use |text_| to figure out the keyword that causes the navigation, then use TemplateURLSerfice::GetTemplateURLForKeyword() to identify the TemplateURL.  Check the TemplateURL to see whether it's safe to delete, then Remove() it.

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 13 2017

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

commit 1eb56350d1b6aa3316f9ce52fc0ec50734cb276c
Author: Mark Pearson <mpearson@chromium.org>
Date: Wed Sep 13 23:19:26 2017

Omnibox - Delete Broken Auto-Generated Custom Search Engines

This prevents the user from trying to use them again and being
frustrated again.

Tested using my personal profile.  Did some searches
using search engines that don't work any more
and noticed they were deleted.  Tried some searches using
default search engines and other custom search engines that
yielded responses and noticed they were not deleted.

Bug:  737775 
Change-Id: Ibf1a32c46d6ce71d6374555eab8844ff9646cbe7
Reviewed-on: https://chromium-review.googlesource.com/658145
Commit-Queue: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501794}
[modify] https://crrev.com/1eb56350d1b6aa3316f9ce52fc0ec50734cb276c/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
[modify] https://crrev.com/1eb56350d1b6aa3316f9ce52fc0ec50734cb276c/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
[modify] https://crrev.com/1eb56350d1b6aa3316f9ce52fc0ec50734cb276c/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment