summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/search_provider.cc
Commit message (Collapse)AuthorAgeFilesLines
* Show the location bar icon (almost) all the time, and have its contents ↵pkasting@chromium.org2010-03-301-2/+2
| | | | | | | | | | | | | | | | | | match what the user is doing. There are a couple major moving parts here: * Change AutocompletePopupModel::URLsForCurrentText() to InfoForCurrentText() and have it return an AutocompleteMatch, which callers can use to parse out whatever they want. I needed to get at the match type for the current text and found the proliferation of arguments here ridiculous. This had major ripple effects throughout the codebase, including changing the name and location of SearchVersusNavigateClassifier as it no longer had an "is_search" parameter directly, so the name became misleading and too narrow. I also ended up adding a null constructor for AutocompleteMatch because it was too cumbersome otherwise. * Change the name of the "SecurityImageView" (or similar) to reflect its broader purpose, and plumb it to the edit to get an icon instead of to the toolbar model. * Add an AutocompleteMatch::Type to icon mapping function, and use it not only in the new code but also to simplify showing the popup contents. BUG=27570,39725 TEST=An icon should appear next to the address at all times. It should be a globe on non-secure pages, a magnifying glass on the NTP, and a match for whatever the user is typing as he types. Review URL: http://codereview.chromium.org/1457002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43025 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 2: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-081-3/+5
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/672007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40945 0039d316-1c4b-4281-b951-d872f2087c98
* Move pref_{member,service} and important_file_writer from chrome/commonphajdan.jr@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | | to chrome/browser. This is a part of an effort to remove bad dependency of chrome/common on chrome/browser. TEST=unit_tests and ui_tests, just moving code BUG=none Review URL: http://codereview.chromium.org/621004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39428 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-191-0/+1
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Format the "?" match like our other search matches. This never got changed ↵pkasting@chromium.org2010-02-111-10/+9
| | | | | | | | | | over during the Omnibox 2 changes. BUG=none TEST=Entering "?" in the address bar should show "<enter query> - Google Search" Review URL: http://codereview.chromium.org/598076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38821 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the history URL provider to handle input of type QUERY. This helps in ↵pkasting@chromium.org2009-10-191-74/+35
| | | | | | | | | | | | | | | | 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
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-101-2/+4
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* Make TOOLKIT_VIEWS port use views-based Autocomplete popup.ben@chromium.org2009-07-311-66/+39
| | | | | | | | | | | | The popups now interact with the edit via AutocompleteEditView rather than the platform-specific types. Note this also removes the old omnibox popup code. It hasn't been active for some time. BUG=none TEST=none Review URL: http://codereview.chromium.org/160378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22168 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where keyword editor would end up prefixing all keyword urlssky@chromium.org2009-06-151-6/+6
| | | | | | | | | | | | | | | | 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
* Remove the Menu object, converting all the remaining callers to use Menu2. ↵ben@chromium.org2009-06-121-3/+3
| | | | | | | | | | | I'll rename Menu2->Menu afterwards. TEST=none BUG=none Review URL: http://codereview.chromium.org/122027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18315 0039d316-1c4b-4281-b951-d872f2087c98
* Update result formatting for the search provider for the Omnibox2 popup.ben@chromium.org2009-06-091-19/+70
| | | | | | | | | | | I've kept the old style in there now too since we have --disable-omnibox2 for a short while so QA can compare if necessary. http://crbug.com/13647 TEST=suggestion completions should be bolded in the omnibox2 dropdown. the first "Search Google For" item should now read "<query> - Search Google" (or whatever your default search engine is). Review URL: http://codereview.chromium.org/119341 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17997 0039d316-1c4b-4281-b951-d872f2087c98
* Headers cleanup in chrome/browser/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | | | | - reduce header dependencies - miscellanous cleanups (add missing includes for OS_ defines etc) Further changesets may follow. I was only looking at header files up to character_encoding.h. Review URL: http://codereview.chromium.org/118072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17470 0039d316-1c4b-4281-b951-d872f2087c98
* Hoist TrimHttpPrefix() so we only have one copy, not one per provider.pkasting@chromium.org2009-05-291-24/+2
| | | | | | | | | Make use of this in HistoryContentsProvider so results from it get their schemes trimmed appropriately. BUG=10558 Review URL: http://codereview.chromium.org/115885 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17145 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
* Fixes bug in search provider. It wasn't setting template_url andsky@chromium.org2009-05-041-0/+4
| | | | | | | | | | | correct fill_into_edit for keywords. BUG=11416 TEST=see bug Review URL: http://codereview.chromium.org/100350 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15245 0039d316-1c4b-4281-b951-d872f2087c98
* Searching by keyword now generates a visit against the site with asky@chromium.org2009-04-271-1/+2
| | | | | | | | | | | | | | | | transition type of TAB_TO_SEARCH. This visit increments the typed count and ensures if you use TAB_TO_SEARCH you still get autocompleted to the site. I'll add some tests for this, but want to make sure we're ok with it before I do that. BUG=3633 TEST=will be covered by unit tests. Review URL: http://codereview.chromium.org/93087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14609 0039d316-1c4b-4281-b951-d872f2087c98
* A basic search provider unit test. This tests asserts a handful of things:sky@chromium.org2009-04-231-9/+23
| | | | | | | | | | | | | | | | | | . The default/keyword suggest providers are queried appropriately. . History results are asked for default/keyword providers. More assertions can be added over time, but we have to start some where. This uncovered one bug in SearchProvider, we were never marking the provider as properly done. BUG=3636 TEST=none Review URL: http://codereview.chromium.org/87062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14315 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fix issue 2674 - search engine name containing parenthesis is not ↵xji@chromium.org2009-04-211-2/+3
| | | | | | | | | | | | | | displayed correctly in Omnibox NavSuggest drop-down list. The fix is to adjust the search engine name according to locale direction so that the search engine name containing parenthesis are marked with RLE-PDF to be displayed correctly in RTL UI. BUG=2674 Review URL: http://codereview.chromium.org/79005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14119 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the omnibox show past searches and suggestions for keywords.sky@chromium.org2009-04-141-123/+272
| | | | | | | | | | | | | | | We talked about primary and secondary, but after doing it all I felt keyword and default better portrayed what is going on. After trying this out I think we need to tune relevancy. But that can be done later BUG=3636 TEST=make sure omnibox isn't broken. Review URL: http://codereview.chromium.org/66073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13668 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-051-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* revert broken change 10833nsylvain@chromium.org2009-03-031-2/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10837 0039d316-1c4b-4281-b951-d872f2087c98
* Port DictionaryValue to use string16 instead of wstring.dsh@google.com2009-03-031-1/+2
| | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10818 Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10833 0039d316-1c4b-4281-b951-d872f2087c98
* Revert dsh's change 10818nsylvain@chromium.org2009-03-031-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10821 0039d316-1c4b-4281-b951-d872f2087c98
* Port DictionaryValue to use string16 instead of wstring.dsh@google.com2009-03-031-1/+1
| | | | | | Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10818 0039d316-1c4b-4281-b951-d872f2087c98
* Misc formatting / cleanup in the autocomplete code.deanm@chromium.org2009-02-271-17/+18
| | | | | | | | | | | | | | - Reformat / reword some comments. - Update include guards to the new style. - Remove trailing blank lines from end of files. - Clean up some includes. - Pull the CompareQuality functor into the implementation. - Pull kQueryDelayMs into the implementation. Review URL: http://codereview.chromium.org/27206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10603 0039d316-1c4b-4281-b951-d872f2087c98
* Coalesce more hardcoded schemes to using predefined constants.brettw@chromium.org2009-02-261-1/+3
| | | | | | Review URL: http://codereview.chromium.org/31008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10437 0039d316-1c4b-4281-b951-d872f2087c98
* Some cleanups in response to brettw's comments to r10277.jhawkins@chromium.org2009-02-241-2/+0
| | | | | | | | | * Remove build_config.h from a file that isn't using it. * Return something useful from StringForURLDisplay. * Use basictypes.h instead of build_config.h. Review URL: http://codereview.chromium.org/27099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10288 0039d316-1c4b-4281-b951-d872f2087c98
* Make autocomplete.cc and dependencies compile on Posix.jhawkins@chromium.org2009-02-241-3/+7
| | | | | | Review URL: http://codereview.chromium.org/28061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10277 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths for grit files. Go ahead and resorttc@google.com2009-02-221-2/+1
| | | | | | | | the headers too. Review URL: http://codereview.chromium.org/21472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10167 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the amount of included header files. Vast change like in "Oh God! ↵maruel@chromium.org2009-02-181-0/+2
| | | | | | | | This revision changes half of the source files!". Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
* Move url_* to net subdirben@chromium.org2009-01-161-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18305 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8224 0039d316-1c4b-4281-b951-d872f2087c98
* Move search code to a subdirben@chromium.org2009-01-161-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8148 0039d316-1c4b-4281-b951-d872f2087c98
* Fie.ben@chromium.org2009-01-151-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8111 0039d316-1c4b-4281-b951-d872f2087c98
* Move search engines files into subdirben@chromium.org2009-01-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8108 0039d316-1c4b-4281-b951-d872f2087c98
* Fixup and verify URLs from the server before adding them to the autocomplete ↵pkasting@chromium.org2009-01-081-3/+9
| | | | | | | | | | dropdown. Original patch by Brian Duff, r=me (see http://codereview.chromium.org/16503 ), tweaked some. BUG=5806 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7747 0039d316-1c4b-4281-b951-d872f2087c98
* Change the signature of JSONReader::Read() and relatedaa@chromium.org2008-12-291-7/+8
| | | | | | | | | methods to be more friendly to use with scoped_ptr. Change all the callsites. Review URL: http://codereview.chromium.org/16270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7486 0039d316-1c4b-4281-b951-d872f2087c98
* Make the autocomplete system and various other connected bits of code use ↵pkasting@chromium.org2008-12-101-4/+4
| | | | | | | | GURL instead of wstring where appropriate. Original patch by phajdan.jr@gmail.com, r=me,sky. See http://codereview.chromium.org/13205 . BUG=715234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6758 0039d316-1c4b-4281-b951-d872f2087c98
* Add error messages to JSONReader and friends. This required a bit of ↵aa@chromium.org2008-12-051-1/+2
| | | | | | | | refactoring to do cleanly. This CL doesn't actually use this capability anywhere except for unit tests. I will add that in a future CL. Review URL: http://codereview.chromium.org/13169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6459 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox metrics logging patch splitout, part 5: Add additional ↵pkasting@chromium.org2008-11-131-6/+10
| | | | | | | | | AutocompleteMatch types, and pass a type to the AutocompleteMatch constructor. The added detail in the new types is not used for anything functional; its sole purpose is for metric logging. Someday we could probably update other bits of the code to make use of this, though (e.g. the paste-and-search vs. paste-and-go determinant code). These are separable changes, but doing either one without the other would have required an annoying number of fragile temporary changes. Review URL: http://codereview.chromium.org/10855 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5329 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox metrics logging patch splitout, part 2: Remove the AutocompleteMatch ↵pkasting@chromium.org2008-11-121-2/+2
| | | | | | | | | NULL constructor. It's too easy to forget to set various members with this. The changes from .resize() to .erase() are necessary because the compiler doesn't know resize() won't be enlarging the vector and thus needing to access the NULL constructor. The changes to the HistoryContents shortcut code were similarly necessary to avoid a NULL construction, but in the end I think made the resulting code a bit clearer. Review URL: http://codereview.chromium.org/10837 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5271 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox metrics logging patch splitout, part 1: Random miscellaneous small ↵pkasting@chromium.org2008-11-121-2/+2
| | | | | | | | style and similar changes. In one or two cases the motivation is not obvious without looking at the original patch. Review URL: http://codereview.chromium.org/10822 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5261 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+3
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Move |result_| and |latest_result_| to the autocomplete controller.pkasting@chromium.org2008-10-091-12/+9
| | | | | | | This purposefully does not change the communication interface between the edit and the popup; that's coming in a subsequent pass. As a result, right now the popup isn't really much simpler. That should eventually change. Review URL: http://codereview.chromium.org/6596 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3113 0039d316-1c4b-4281-b951-d872f2087c98
* See if 'charset' is available in HTTP response header and use that to ↵jungshik@google.com2008-09-261-1/+18
| | | | | | | | | | | | | | | | | convert the response to UTF-8 before sending over to JSON deserializer. (previously this issue was tracked internally as issue 1293145) BUG=2806 TEST=In French Chrome, set your default search engine to Voila and begin to type a word with an accented letters and see if 'Search Voila for ' contains the word (it's not a bullet-proof test). In Korean chrome, set the default search engine to Daum and begin to type a Korean word (with Korean IME on, type 'qk'). Review URL: http://codereview.chromium.org/4287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2623 0039d316-1c4b-4281-b951-d872f2087c98
* Renames BoomarkBarModel to BookmarkModel.sky@google.com2008-09-111-1/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1912 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2057 0039d316-1c4b-4281-b951-d872f2087c98
* Don't send queries when URL is like:darin@chromium.org2008-09-101-11/+41
| | | | | | | | | | | | | | | - starts with http:// or https:// and includes username (e.g. http://me@test.com/) - starts with http:// or https:// and includes query (e.g. http://test.com/?q=x) - starts with https:// and includes path component (e.g. https://test.com/path) so as not to leak user data to the suggest server. Patch by takayoshi.kochi@gmail.com BUG=1647 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1978 0039d316-1c4b-4281-b951-d872f2087c98
* Moves bookmark related classes into bookmarks directory. There are nosky@google.com2008-09-091-1/+1
| | | | | | | | | | | | code changes here (other than converting to COPY_AND_BLAH_BLAH and updating include guards). BUG=none TEST=none Review URL: http://codereview.chromium.org/1868 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1944 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member ↵darin@google.com2008-09-031-2/+5
| | | | | | | | | | | variables into the Task subclass. Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes up the autocomplete providers to correctly update starredsky@google.com2008-08-211-53/+10
| | | | | | | | | | | state. I broke this in order to land my last mongo patch. HistoryContentsProvider is still lacking in one area. BUG=1256202 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1181 0039d316-1c4b-4281-b951-d872f2087c98