summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/keyword_provider.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move notification_source from content/common to content/browser/public and ↵jam@chromium.org2011-10-191-8/+8
| | | | | | | | put it into the content namespace. BUG=98716 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106203 0039d316-1c4b-4281-b951-d872f2087c98
* Move PageTransition into content namespace. While I'm touching all these ↵jam@chromium.org2011-10-131-1/+1
| | | | | | | | | files, I've also updated it to use the enum naming convention in the Content API. BUG=98716 Review URL: http://codereview.chromium.org/8253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105254 0039d316-1c4b-4281-b951-d872f2087c98
* Remove confidence from AutocompleteMatch and use History DB instead.dominich@chromium.org2011-09-011-2/+1
| | | | | | | | | | | | Adds a class responsible for providing recommended actions given an AutocompleteMatch which uses the History Database to determine that action. BUG=92896,94423 TEST=NetworkActionPredictorTest* Review URL: http://codereview.chromium.org/7686012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99140 0039d316-1c4b-4281-b951-d872f2087c98
* Add a URL param to indicate group selection in Instant field trial.sreeram@chromium.org2011-08-161-4/+5
| | | | | | | | | | | | | | | | | Currently, if the user is chosen into an Instant field trial group, this information is not indicated in the suggest or search request URLs. Such a URL param will allow us to analyze experiment metrics from server logs. Most of the changes here are because we need to pass the Profile information through to the Instant field trial code. BUG=91536 TEST=Observe ix=c or ix=e showing up in the URLs sent for suggest/search. Review URL: http://codereview.chromium.org/7558014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96954 0039d316-1c4b-4281-b951-d872f2087c98
* Add confidence to AutocompleteMatch.dominich@chromium.org2011-08-111-1/+2
| | | | | | | | | | | | | | Calculated by each provider using whatever measure makes sense and stored as a float in the range [0, 1]. Will be used for determining benefit of using instant, prerender, DNS preconnect to increase success rate and avoid wasted resources. Currently fed into UMA to validate experiment. BUG=None TEST=None Review URL: http://codereview.chromium.org/7607007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96446 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the SearchProvider set the description from the KeywordProvider.sky@chromium.org2011-07-141-14/+0
| | | | | | | | | | BUG=89263 TEST=none R=pkasting@chromium.org Review URL: http://codereview.chromium.org/7328002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92452 0039d316-1c4b-4281-b951-d872f2087c98
* Moving notification types which are chrome specific to a new header file ↵ananta@chromium.org2011-07-101-9/+11
| | | | | | | | | | | | | chrome_notification_types.h. This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a regression where the omnibox would re-enter extension keyword mode aftermpcomplete@chromium.org2011-07-071-1/+3
| | | | | | | | | | | | choosing a selection. BUG=88552 TEST=see bug for repro Review URL: http://codereview.chromium.org/7307033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91780 0039d316-1c4b-4281-b951-d872f2087c98
* Changes TemplateURLModel into TemplateURLService. Changes all access points ↵erg@google.com2011-06-071-7/+12
| | | | | | | | | | | | | | to go through the newly made ProfileKeyedServiceFactory subclass. In addition, makes further modifications to the unit testing stuff because the TemplateURL tests change the active TemplateURLService on a profile during the test. BUG=77155 TEST=unit tests R=mirandac Review URL: http://codereview.chromium.org/7056056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88153 0039d316-1c4b-4281-b951-d872f2087c98
* Makes autocompleting previous search terms work on word boundaries.sky@chromium.org2011-05-091-2/+4
| | | | | | | | | | BUG=80057 TEST=covered by unit tests, but see bugs for details. R=pkasting@chromium.org Review URL: http://codereview.chromium.org/6893140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84681 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ExtensionService/ExtensionServiceInterface to be more testableakalin@chromium.org2011-04-061-2/+3
| | | | | | | | | | | | | | | | | | | | | In particular: - Add various status accessors to ExtensionServiceInterface (e.g., IsExtensionEnabled()) - Convert IsIncognitoEnabled() to take an ID instead of an Extension*. - Add CheckForUpdates() to ExtensionServiceInterface. - Remove various unneeded accessors from ExtensionServiceInterface. Rewrite some sync utility functions to take advantage of the new interface (although it will be rewritten more in a future CL). BUG=77995 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80539 Review URL: http://codereview.chromium.org/6720042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80705 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80539 - Refactor ExtensionService/ExtensionServiceInterface to be ↵cmp@chromium.org2011-04-061-3/+2
| | | | | | | | | more testableIn particular:- Add various status accessors to ExtensionServiceInterface (e.g., IsExtensionEnabled())- Convert IsIncognitoEnabled() to take an ID instead of an Extension*.- Add CheckForUpdates() to ExtensionServiceInterface.- Remove various unneeded accessors from ExtensionServiceInterface.Rewrite some sync utility functions to take advantage of the newinterface (although it will be rewritten more in a future CL).BUG=77995TEST=Review URL: http://codereview.chromium.org/6720042 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/6804010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80613 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ExtensionService/ExtensionServiceInterface to be more testableakalin@chromium.org2011-04-051-2/+3
| | | | | | | | | | | | | | | | | | | In particular: - Add various status accessors to ExtensionServiceInterface (e.g., IsExtensionEnabled()) - Convert IsIncognitoEnabled() to take an ID instead of an Extension*. - Add CheckForUpdates() to ExtensionServiceInterface. - Remove various unneeded accessors from ExtensionServiceInterface. Rewrite some sync utility functions to take advantage of the new interface (although it will be rewritten more in a future CL). BUG=77995 TEST= Review URL: http://codereview.chromium.org/6720042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80539 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the search provider not return results that look like URLs.sky@chromium.org2011-04-041-2/+4
| | | | | | | | | | BUG=77065 TEST=see bug, also covered by unit test R=pkasting@chromium.org Review URL: http://codereview.chromium.org/6711087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80308 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of notification files.tfarina@chromium.org2011-03-081-2/+2
| | | | | | | | | | | First part of the remaining files. BUG=None TEST=None Review URL: http://codereview.chromium.org/6649001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77330 0039d316-1c4b-4281-b951-d872f2087c98
* Always allow exact match non-substituting keywords.suzhe@google.com2011-01-261-7/+7
| | | | | | | | | BUG=70807 TEST=See bug report. Review URL: http://codereview.chromium.org/6334017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72586 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from autocomplete.avi@chromium.org2011-01-251-50/+46
| | | | | | | | | | | Recommit of r72380. BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6306011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72492 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 72380 - Remove wstring from autocomplete.avi@chromium.org2011-01-241-46/+50
| | | | | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6258015 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6256010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72385 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from autocomplete.avi@chromium.org2011-01-241-50/+46
| | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6258015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72380 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to ui/baseben@chromium.org2011-01-211-1/+1
| | | | | | | | | BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72227 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-191-21/+27
| | | | | | | | | | | Re-landing r71485 (which was reverted in r71500). BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6278007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71814 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71485 - Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-141-27/+21
| | | | | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6291003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71500 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-141-21/+27
| | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71485 0039d316-1c4b-4281-b951-d872f2087c98
* Fix several omnibox issues related to keyword mode and IME support.suzhe@google.com2011-01-131-7/+11
| | | | | | | | | | | | | | | | | | | | | | | This CL contains following changes to omnibox code: 1. Make sure |keyword_ui_state_| is always updated correctly, i.e. it should always be KEYWORD when keyword UI is visible. 2. Make sure |keyword_ui_state_| will never be changed during IME composition. 3. Make sure OnInlineAutocompleteTextMaybeChanged() will only be called when inline autocomplete suggest is changed. This CL fixes following bugs. Old fix for bug 2720 and 3798 has been removed. BUG=2720 BUG=3798 BUG=39947 BUG=62426 TEST=See bug reports. Review URL: http://codereview.chromium.org/6131005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71268 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70281 - Revert 70271 - Remove wstring from l10n_util. Part 3.avi@chromium.org2010-12-291-16/+19
| | | | | | | | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6044006 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6051012 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/5989012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70283 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70271 - Remove wstring from l10n_util. Part 3.avi@chromium.org2010-12-291-19/+16
| | | | | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6044006 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6051012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70281 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from l10n_util. Part 3.avi@chromium.org2010-12-291-16/+19
| | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6044006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70271 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded includes of notification_service.h.thestig@chromium.org2010-12-171-1/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5875005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69507 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ExtensionsService to ExtensionService.tfarina@chromium.org2010-12-141-2/+2
| | | | | | | | | BUG=61409 TEST=trybots Review URL: http://codereview.chromium.org/5730004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69117 0039d316-1c4b-4281-b951-d872f2087c98
* Make chrome.omnibox.setDefaultSuggestion work when called insidempcomplete@chromium.org2010-12-071-45/+70
| | | | | | | | | | | onInputChanged. BUG=64538 TEST=Use the chrome_search sample extension and make sure the first suggestion updates in sync with what you type. Review URL: http://codereview.chromium.org/5607003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68411 0039d316-1c4b-4281-b951-d872f2087c98
* Move:ben@chromium.org2010-12-021-1/+1
| | | | | | | | | | | | | | | file_path_watcher into subdir profile* into profiles/ subdir login* into ui/login visitedlink* into subdir BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/5606002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68069 0039d316-1c4b-4281-b951-d872f2087c98
* Add an API for extensions to set the description text for the defaultaa@chromium.org2010-11-271-0/+4
| | | | | | | | | | selection in an omnibox keyword session. BUG=63500 TEST=none TBR=mpcomplete@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67494 0039d316-1c4b-4281-b951-d872f2087c98
* Make extensions keyword providers accept empty input.aa@chromium.org2010-11-171-1/+5
| | | | | | | | | BUG=63505 TEST=n/a Review URL: http://codereview.chromium.org/5203001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66539 0039d316-1c4b-4281-b951-d872f2087c98
* Don't allow exact keyword matches for most uses of the autocomplete ↵pkasting@chromium.org2010-11-101-4/+11
| | | | | | | | | | classifier. Patch by Naoki Takano (see http://codereview.chromium.org/4142006 ), r=me. BUG=60059 TEST=Change a search engine keyword to "a", highlight text beginning with "a" in a webpage (e.g. "a movie"), right-click and select "Search Google for a movie". The result should be a Google search page, not a result page for whatever search engine has the keyword "a". Review URL: http://codereview.chromium.org/4717001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65706 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some UI issues with omnibox extensions in incognito.mpcomplete@chromium.org2010-11-031-16/+25
| | | | | | | | | | | Also moved a shared method from ExtensionEventRouter to ExtensionsService. BUG=58210 TEST=Install the extension in chrome/common/extensions/docs/examples/extensions/chrome_search. You should not see the UI artifacts described in the bug. Review URL: http://codereview.chromium.org/4234004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64964 0039d316-1c4b-4281-b951-d872f2087c98
* Part 3 of immutable Extension refactor.mpcomplete@chromium.org2010-10-291-1/+1
| | | | | | | | | | | | | Make ExtensionsService hold const Extension pointers only. This ensures that extensions can't be modified after they're created, and lets us share them between threads. BUG=56558 TEST=no functional change Review URL: http://codereview.chromium.org/4138006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64517 0039d316-1c4b-4281-b951-d872f2087c98
* [GTK] Added unit tests for omnibox highlightingscr@chromium.org2010-10-271-0/+1
| | | | | | | | | | BUG=55418 TEST=unit_tests --gtest_filter=AutocompletePopupViewGtkTest.\* should run tests on GTK but not Windows or Mac. Review URL: http://codereview.chromium.org/4082002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64169 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Continue fixing nits found by my automated source scanner.erg@google.com2010-10-051-0/+2
| | | | | | | | | | | (~1.3 megs off Debug linux .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3556013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61587 0039d316-1c4b-4281-b951-d872f2087c98
* Don't treat input with a scheme that's not "http" or "https" as a potential ↵pkasting@chromium.org2010-09-011-1/+4
| | | | | | | | | | keyword search. BUG=27038 TEST=Type in "site:yahoo.com foo". You should not go into keyword search mode. Review URL: http://codereview.chromium.org/3259010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58248 0039d316-1c4b-4281-b951-d872f2087c98
* Disable autocomplete for search keywords.isherman@chromium.org2010-08-171-4/+7
| | | | | | | | | | | We have custom UI for search keywords anyway, so in practice a user would never see the autocompleted url. But, we had been computing the index incorrectly in some cases, as we trim off "http://" and "www." to compute the keyword. Since we don't use it anyway, simplify the logic and get rid of it :) BUG=none TEST=none Review URL: http://codereview.chromium.org/3151020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56445 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for omnibox.onInputStarted and onInputCancelled.mpcomplete@chromium.org2010-07-021-0/+60
| | | | | | | | | | | | Also fix a bug where we'd keep an extension's old keyword even if it changed on upgrade/reload. BUG=46475 BUG=48091 Review URL: http://codereview.chromium.org/2807033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51540 0039d316-1c4b-4281-b951-d872f2087c98
* Change a bunch of string types.estade@chromium.org2010-06-291-3/+3
| | | | | | | | | | | | | Started out just trying to change PrefService::GetString and ::SetString. This snowballed a little bit. Had to change a bunch of url strings in search_engines/ from wstring to string (some of them may be better off as GURLs, but UTF-8 is a step in the right direction, since that's what GURL uses internally, as well as externally via its setters/getters). TODO (later patch): things that ask for accepted languages should use std::string, not std::wstring. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/2854015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51157 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some issues with the omnibox extension API in incognito windows.mpcomplete@chromium.org2010-06-221-6/+24
| | | | | | | | | | | | - Don't enter "keyword" mode unless the extension is enabled and allowed in incognito. - Show extension suggest results for incognito windows. BUG=46933 Review URL: http://codereview.chromium.org/2810020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50498 0039d316-1c4b-4281-b951-d872f2087c98
* Address some visual problems with the omnibox extension API:mpcomplete@chromium.org2010-06-211-38/+26
| | | | | | | | | | | | - Remove some of the boilerplate strings. - Allow the description field to be fully customizable and stylable. BUG=46478 BUG=46479 Review URL: http://codereview.chromium.org/2849015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50411 0039d316-1c4b-4281-b951-d872f2087c98
* First pass at experimental omnibox API. There are plenty of rough edges and ↵mpcomplete@chromium.org2010-05-281-19/+128
| | | | | | | | | | | | | | | features to work on, but it's in a usable state. When an extension is installed that specifies an omnibox keyword in its manifest, we add that keyword to the user's list of Search Engines. The user can then edit this keyword later. I'm leveraging most of the original search engine keyword code. An extension keyword has a special URL that identifies it as an extension keyword. There is some special case code to treat these keywords slightly differently throughout the omnibox code. BUG=38884 Review URL: http://codereview.chromium.org/2078021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48503 0039d316-1c4b-4281-b951-d872f2087c98
* Remove --omnibox-popup-count flag.tfarina@chromium.org2010-05-181-3/+3
| | | | | | | | | BUG=40083 TEST=compiles Review URL: http://codereview.chromium.org/2013008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47482 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 1: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-081-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/672001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40937 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the history URL provider to handle input of type QUERY. This helps in ↵pkasting@chromium.org2009-10-191-17/+4
| | | | | | | | | | | | | | | | the case where the user types something that on its own isn't navigable, but might be the prefix of something else navigable. While there are no tests for this directly, another change of mine to treat more inputs with explicit schemes as queries (e.g. "http:/") relies on this, and does unittest for it. In order to fit the new relevance scores into the table, I went through and simplified the relevance scoring so that generally providers used the same scores for more input types. The effects of this should be barely noticeable (it affects the ranking of past search queries that are old against results from the secondary search provider), and it simplifies the code noticeably. This also fixes a "bug" that the NavSuggest results were incremented backwards, but since we only score one of these right now there's no visible effect. BUG=none TEST=none Review URL: http://codereview.chromium.org/291005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29428 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where keyword editor would end up prefixing all keyword urlssky@chromium.org2009-06-151-2/+2
| | | | | | | | | | | | | | | | with "http://" if they didn't have one. This proves problematic as for the google search url we don't have http:// and don't want it. The fix is to only add http:// if the url field is editable. If the url field isn't editable, we know the user hasn't editted it and don't need to try and fix it up. BUG=13282 TEST=see bug, but also make sure you don't run into any other problems with the keyword editor. Review URL: http://codereview.chromium.org/126052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18410 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-1/+1
| | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98