summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
Commit message (Collapse)AuthorAgeFilesLines
* Revert of Reduces dependency from AutocompleteMatch to Profile. ↵jochen@chromium.org2014-07-0214-110/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/354773002/) Reason for revert: AutocompleteProviderTest.GetDestinationURL crashes on dbg bots Original issue's description: > Reduces dependency from AutocompleteMatch to Profile. > > BUG=388510 > R=hashimoto@chromium.org, blundell@chromium.org, pkasting@chromium.org > TBR=dtrainor@chromium.org > TEST=compile > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280955 TBR=hashimoto@chromium.org,blundell@chromium.org,pkasting@chromium.org,dtrainor@chromium.org,mukai@chromium.org NOTREECHECKS=true NOTRY=true BUG=388510 Review URL: https://codereview.chromium.org/363893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280983 0039d316-1c4b-4281-b951-d872f2087c98
* Stop depending on chrome/browser/rlz/rlz.h from TemplateURLServicehashimoto@chromium.org2014-07-022-2/+4
| | | | | | | | | | | | TemplateURLServiceFactory is responsible to inject a Closure. BUG=381572 TEST=build a RLZ enabled binary TBR=battre@chromium.org for profile_resetter_unittest.cc Review URL: https://codereview.chromium.org/366523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280974 0039d316-1c4b-4281-b951-d872f2087c98
* Reduces dependency from AutocompleteMatch to Profile.mukai@chromium.org2014-07-0214-84/+110
| | | | | | | | | | | BUG=388510 R=hashimoto@chromium.org, blundell@chromium.org, pkasting@chromium.org TBR=dtrainor@chromium.org TEST=compile Review URL: https://codereview.chromium.org/354773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280955 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary search.h includes.mukai@chromium.org2014-07-013-3/+0
| | | | | | | | | | BUG=371538 R=pkasting@chromium.org TEST=compile Review URL: https://codereview.chromium.org/368673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280913 0039d316-1c4b-4281-b951-d872f2087c98
* It's not used.mpearson@chromium.org2014-07-017-514/+6
| | | | | | | | BUG=389338 Review URL: https://codereview.chromium.org/361773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280873 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using chrome/browser/metrics/rappor/sampling.h from TemplateURLServicehashimoto@chromium.org2014-06-282-2/+2
| | | | | | | | | | | | | Pass RapporService* to the ctor of TemplateURLService instead of calling a wrapper function which implicitly relies on g_browser_process. Remove the wrapper function rappor::SampleDomainAndRegistryFromHost() which is no longer used. BUG=386367 TEST=git cl try TBR=battre@chromium.org for the addition of NULL in profile_resetter Review URL: https://codereview.chromium.org/331043006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280527 0039d316-1c4b-4281-b951-d872f2087c98
* Move autocomplete_input* to components/autocompletemukai@chromium.org2014-06-2826-1033/+23
| | | | | | | | | | | BUG=386890 R=pkasting@chromium.org, blundell@chromium.org TBR=dtrainor@chromium.org, mpcomplete@chromium.org TEST=compile Review URL: https://codereview.chromium.org/354193003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280497 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out the dependency from autocomplete_input.mukai@chromium.org2014-06-2727-192/+326
| | | | | | | | | | | | | | | | | | | This is the first step of componentization of autocomplete_input. autocomplete_input depends on several directories in chrome/browser, but all of them are in Parse(). This CL introduces a new interface AutocompleteInputSchemeChecker for the task in Parse() and removes the dependencies from autocomplete_input to the directories. The next CL will move the autocomplete_input files actually. BUG=386890 R=pkasting@chromium.org, blundell@chromium.org TBR=dtrainor@chromium.org, mpcomplete@chromium.org, rdsmith@chromium.org, abarth@chromium.org TEST=build succeeds Review URL: https://codereview.chromium.org/347963003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280244 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize InMemoryDatabasehashimoto@chromium.org2014-06-261-1/+1
| | | | | | | | | | | | Move in_memory_database.{cc,h} from chrome/browser/history to components/history/core/browser BUG=387284 TEST=build TBR=sky@chromium.org for include fix under chrome/browser Review URL: https://codereview.chromium.org/344733006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280058 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize URLDatabasehashimoto@chromium.org2014-06-258-5/+11
| | | | | | | | | | | | | | | | | | | Move chrome/browser/history/url_database.{cc,h} to components/history/core/browser. From chrome/browser/history/history_types.{cc,h}: - Move URLID, URLRow and URLResult to url_row.{cc,h} - Move KeywordSearchTermVisit and KeywordSearchTermRow to keyword_search_term.{cc,h} - Move autocomplete threshold related stuff (kLowQualityMatch* constants and two threshold related functions) to url_databse.{cc,h} BUG=387284 TEST=git cl try TBR=sky@chromium.org for include fix under chrome/browser TBR=mmenke@chrmoium.org as an owner of net, a new dependency added to components/history/DEPS TBR=blundell@chromium.org as an owner of components/history.gypi Review URL: https://codereview.chromium.org/339433007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279859 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize TemplateURLPrepopulateData, DefaultSearchManager and ↵hashimoto@chromium.org2014-06-253-3/+3
| | | | | | | | | | | | | | | | | | DefaultSearchPolicyHandler Move TemplateURLPrepopulateData, DefaultSearchManager and DefaultSearchPolicyHandler from chrome/browser/search_engines to components/search_engines. Fix DEPS and gyp. Fix template_url_prepopulate_data.cc to stop including unnecessary headers. BUG=371535 TEST=build TBR=sky@chromium.org for include fix under chrome/browser TBR=aruslan@chromium.org for DEPS and include changes under chrome/android TBR=blundell@chromium.org as an owner of new dependencies (components/policy and components/pref_registry) added to components/search_engines/DEPS Review URL: https://codereview.chromium.org/355853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279792 0039d316-1c4b-4281-b951-d872f2087c98
* Port HistoryService::QueryRedirects{From,To} to CancelableTaskTrackersdefresne@chromium.org2014-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | The callback no longer receive a HistoryService::Handle but instead a base::CancelableTaskTracker::TaskId that they can use to cancel the task via the base::CancelableTaskTracker. Remove HistoryBackend::GetMostRecentRedirects{From,To} that backed the HistoryBackend::QueryRedirects{From,To} as they now have the same interface. Remove the success and url parameters to the QueryRedirectsCallback as the url can be bound by the caller if required (most of them don't) and no code path used the success value. BUG=371818 Review URL: https://codereview.chromium.org/349153006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279727 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox HUP: Comment Cleanupmpearson@chromium.org2014-06-252-11/+8
| | | | | | | | | | | Following suggestions from https://codereview.chromium.org/347963002/ BUG=380357 Review URL: https://codereview.chromium.org/349183004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279664 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize TemplateURLhashimoto@chromium.org2014-06-2514-14/+14
| | | | | | | | | | | | | | | | | Move chrome/browser/search_engines/template_url.{cc,h} to components/search_engines with tools/git/move_source_file.py Remove template_url.* from chrome_browser.gypi. Add templatee_url.* and dependencies to search_engines.gypi. Add lines to components/search_engines/DEPS. Fix includes in template_url.* BUG=386365 TEST=build TBR=sky@chromium.org for include fix under chrome/browser TBR=blundell@chromium.org, rogerta@chromium.org, mmenke@chromium.org, danakj@chromium.org for the DEPS change Review URL: https://codereview.chromium.org/346023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279641 0039d316-1c4b-4281-b951-d872f2087c98
* No chrome/ dependencies in TemplateURLhashimoto@chromium.org2014-06-234-3/+55
| | | | | | | | | | | | | | | | | | Move kExtraSearchQueryParams from chrome_switches to a new file search_engines_switches. Add 4 new methods to SearchTermsData: - EnableAnswersInSuggest() to replace OmniboxFieldTrial::EnableAnswersInSuggest() - IsShowingSearchTermsOnSearchResultsPages() to replace TemplateURL::showing_search_terms_ - InstantExtendedEnabledParam() to replace chrome::InstantExtendedEnabledParam(). - ForceInstantResultsParam() to replace chrome::ForceInstantResultsParam(). Add DEPS to prevent new dependencies. BUG=386365 TEST=unit_tests TBR=kmadhusu@chromium.org for an addition of #include in chrome/browser/search/search_unittest.cc Review URL: https://codereview.chromium.org/348853005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279071 0039d316-1c4b-4281-b951-d872f2087c98
* Fix assumption about zero suggest results.mariakhomenko@chromium.org2014-06-211-3/+5
| | | | | | | | | | | | The code currently DCHECKs that zero suggest results are always search suggest or navsuggest, but they can also be of type personalized query. BUG=387247 TBR=mpearson Review URL: https://codereview.chromium.org/348913003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278940 0039d316-1c4b-4281-b951-d872f2087c98
* The omnibox should check protocols registered via registerProtocolHandler, notpkasting@chromium.org2014-06-2124-126/+172
| | | | | | | | | | | | just external protocols. BUG=99900 TEST=Visit http://www.remotespark.com:8080/rph.html, click "Register" and OK the infobar prompt, paste "web+rdp:192.168.8.108" in the omnibox and check that the default action is to navigate TBR=mpcomplete,miguelg Review URL: https://codereview.chromium.org/304973005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278925 0039d316-1c4b-4281-b951-d872f2087c98
* Enable ZeroSuggest in Chrome for launched platforms (Windows, ChromeOS, ↵hfung@chromium.org2014-06-212-12/+35
| | | | | | | | | | | | Linux, Mac) Remove activation of ZeroSuggest from AutocompleteDynamicFieldTrial BUG=383554,340489 Review URL: https://codereview.chromium.org/339253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278901 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Add Field Trial to Create UWYT When Inliningmpearson@chromium.org2014-06-202-18/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when HistoryURL provider decides to promote a match for inline autocompletion, it will then decline to offer a what-you-typed match even if it's valid and reasonable. This behavior can cause problems in DisableInling mode because this means that sometimes HistoryURL provider will not create a UWYT match. Consequently, the default match in this mode can become a search-what-you-typed even when the input is a valid URL. This causes all sorts of badness and irritation. This changelist creates a new mechanism, controlled through a field trial parameter, that forces creation of the UWYT match if it wasn't added due to this reason (promoted URL for inline autocompletion). This is one approach to implement this strategy. The other approach is in https://codereview.chromium.org/321243003/ Did some basic tests using a local field trial server with the proper params. TBR=pkasting (to get this in M-37) BUG=380357 Review URL: https://codereview.chromium.org/347963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278811 0039d316-1c4b-4281-b951-d872f2087c98
* Move GenerateSearchURL() and GenerateKeyword() from TemplateURLService to ↵hashimoto@chromium.org2014-06-201-2/+1
| | | | | | | | | | | | | | | TemplateURL TemplateURL should not depend on TemplateURLService. BUG=386365 TEST=unit_tests R=pkasting@chromium.org TBR=profile_resetter, renderer_context_menu}, sky@chromium.org for chrome/browser/{importer Review URL: https://codereview.chromium.org/343823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278751 0039d316-1c4b-4281-b951-d872f2087c98
* Remove AutocompleteInput Type and PageClassification.mukai@chromium.org2014-06-2025-170/+160
| | | | | | | | | | | | | | | They are just as same as the enums defined in .proto files. Removing the declaration of these types reduces unnecessary code dependency to autocomplete. BUG=384232 R=blundell@chromium.org, mpearson@chromium.org, pkasting@chromium.org TBR=brettw@chromium.org, cpu@chromium.org, miguelg@chromium.org, mpcomplete@chromium.org TEST=compile succeeds Review URL: https://codereview.chromium.org/343523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278722 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Command-line flag and field trial changes.jdonnelly@chromium.org2014-06-201-2/+1
| | | | | | | | | | | | - Finch field trial parameter - Command-line flag to force the feature off - OmniboxFieldTrial::EnableAnswersInSuggest(), which considers command-line flags and field trial settings. BUG=386638 Review URL: https://codereview.chromium.org/348433009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278664 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Add prefetching for Answers images.groby@chromium.org2014-06-202-0/+34
| | | | | | | | | | | BUG=380916 R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://codereview.chromium.org/314013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278653 0039d316-1c4b-4281-b951-d872f2087c98
* Don't call AutocompleteInput::Parse() on a background thread, part 2.pkasting@chromium.org2014-06-204-184/+191
| | | | | | | | | | | | | | | | | | | | This changes HistoryURLProviderParams from holding an ACMatches object to holding a HistoryMatches object; the HistoryMatches will no longer be fixed up in DoAutocomplete(), but rather after it returns control to the UI thread. The majority of this change is mechanical, but some nontrivial changes have to be made to DoAutocomplete() to account for how the "promote" action it could previously take must also happen on the UI thread. Therefore the |params| object also has to gain a few members to allow the post-DoAutocomplete() code to do promotion correctly. BUG=376199 TEST=none R=mpearson@chromium.org Review URL: https://codereview.chromium.org/333273009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278558 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize google_utilblundell@chromium.org2014-06-191-1/+1
| | | | | | | | | | | | Also removes the indirection through the client that GoogleURLTracker was previously doing to call a google_util function. BUG=373245,381088 TBR=jochen Review URL: https://codereview.chromium.org/333723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278448 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Profile* from TemplateURLhashimoto@chromium.org2014-06-1810-20/+20
| | | | | | | | | | | | | | Remove TemplateURL::profile_. Remove TemplateURLService::AddAndSetProfile which does nothing other than calling Add(). Merge TemplateURLService::GenerateSearchURLUsingTermsData and GenerateSearchURLUsingTermsData. BUG=383283 TEST=git cl try TBR=sky@chromium.org Review URL: https://codereview.chromium.org/338363004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277965 0039d316-1c4b-4281-b951-d872f2087c98
* Don't call AutocompleteInput::Parse() on a background thread, part 1.pkasting@chromium.org2014-06-172-120/+111
| | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating the exact match in HistoryURLProvider::DoAutocomplete(), pass it in in the HistoryURLProviderParams struct. This also uses this match as the "can't find DB, fallback" match in Start(); I don't see any disadvantage to creating that match on the results of running fixup, instead of creating a pre-fixup match like before. This also splits out CanPromoteMatchForInlineAutocomplete() from PromoteMatchForInlineAutocomplete(). I'll be converting PromoteMatchForInlineAutocomplete() into a different function in the next part of this change, and this happens to make the calling convention a little more sane anyway. Also removes a few comments from the .cc file that are in the .h file already. BUG=376199 TEST=none R=mpearson@chromium.org Review URL: https://codereview.chromium.org/336173005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277886 0039d316-1c4b-4281-b951-d872f2087c98
* Create a new component "autocomplete"hashimoto@chromium.org2014-06-1710-170/+5
| | | | | | | | | | | | Move chrome/browser/autocomplete/url_prefix.{cc,h} to components/autocomplete BUG=371538 TEST=git cl try TBR=sky@chromium.org for chrome/browser/DEPS Review URL: https://codereview.chromium.org/330233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277616 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using UIThreadSearchTermsData in TemplateURLhashimoto@chromium.org2014-06-1611-43/+91
| | | | | | | | | | | | | | | | Pass SearchTermsData for TemplateURL methods. Add TemplateURLService::search_terms_data(). Remove unused function GetLogoURL() from template_url_prepopulate_data.cc Fix callers to pass SearchTermsData owned by TemplateURLService or create UIThreadSearchTermsData from Profile. BUG=383283 TEST=git cl try TBR=sky@chromium.org Review URL: https://codereview.chromium.org/326403007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277577 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Add a new AutocompleteMatchType for answers in suggest.jdonnelly@chromium.org2014-06-134-1/+10
| | | | | | | | BUG=383456 Review URL: https://codereview.chromium.org/327003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276924 0039d316-1c4b-4281-b951-d872f2087c98
* Make HistoryQuickProvider::DeleteMatch also delete the underlying URL from ↵engedy@chromium.org2014-06-124-16/+31
| | | | | | | | | | the History Database. BUG=383272 Review URL: https://codereview.chromium.org/329073003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276777 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: append old matches, don't attempt to insert themmpearson@chromium.org2014-06-122-24/+1
| | | | | | | | | | | | | | | | | | | | Make AddMatch() append old matches rather than attempt to insert them in order. We call SortAndCull() after AddMatch() in the only code path that uses AddMatch(), so the order doesn't matter. Then eliminate AddMatch() because the revised version is short, instead inlining the few things it still does in its only caller. In some quick interactive testing, I didn't notice any problems. The autocomplete_result tests still pass also. (That said, I don't think we test CopyOldMatches that extensively in it.) BUG=380357 Review URL: https://codereview.chromium.org/329783003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276714 0039d316-1c4b-4281-b951-d872f2087c98
* Move search_terms_data to components/search_engineshashimoto@chromium.org2014-06-122-1/+2
| | | | | | | | | | | | | | Rename chrome/browser/search_terms_data* to ui_thread_search_terms_data*. Split SearchTermsData to a separate file and move it to components/search_engines. Add DEPS from components/search_engines to components/google/core as it's used in search_terms_data.cc. BUG=383283 TEST=git cl try TBR=sky@chromium.org for include fix and DEPS removal Review URL: https://codereview.chromium.org/324283003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276704 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize URLFixerUpper.blundell@chromium.org2014-06-129-32/+29
| | | | | | | | | | | | | | | | | | | | | This CL moves URLFixerUpper into a new url_fixer component to allow this code to be shared by the iOS port. At the present time the component contains some minor Chrome-specific logic. Specifically, it rewrites about:// to chrome:// and uses about:// version as the default about:// host. We decided not to abstract this logic at this time, as the only embedders wishing to use this component are ports of Chrome. However, if there comes to be a non-Chrome embedder that wishes to use this component, this behavior could easily be generalized (e.g., by exposing the variables that are used for these purposes in the header file to allow the embedder to customize them). BUG=373229 R=jam@chromium.org TBR=mmenke NOTREECHECKS=true Review URL: https://codereview.chromium.org/320253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276672 0039d316-1c4b-4281-b951-d872f2087c98
* Move BookmarkMatch into bookmarks namespace.tfarina@chromium.org2014-06-123-2/+9
| | | | | | | | | | BUG=370433 TEST=None R=sky@chromium.org Review URL: https://codereview.chromium.org/323763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276565 0039d316-1c4b-4281-b951-d872f2087c98
* Move prepopulated_engines to components/search_engineshashimoto@chromium.org2014-06-121-1/+1
| | | | | | | | | | | | | Move search_engine_type.h from chrome/browser/search_engines to components/search_engines Move prepopulated_engines* to components/search_engines TBR=asvitkine@chromium.org for the comment fix in tools/metrics/histograms/histograms.xml BUG=371535 TEST=git cl try Review URL: https://codereview.chromium.org/330433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276533 0039d316-1c4b-4281-b951-d872f2087c98
* Misc. cleanup for HistoryURLProvider. No functional changes.pkasting@chromium.org2014-06-112-256/+234
| | | | | | | | | | | | | | | | | | | | | | | | * Make the order of functions in the anonymous namespace match the order in which they're referenced by the rest of the file. * Cleanup comments: rewrap, move .cc comments to .h in some cases, and fix .h comments to reflect elimination of RunAutocompletePasses() (that was checked in already). * Make DoAutocomplete() and QueryComplete() private. * Place static member functions above non-static ones. * Make CalculateRelevance() static instead of const. Make it take an int in preparation for a future refactoring theoretically passing a negative |match_number|. * Convert CalculateRelevanceScoreUsingScoringParams() to a file-scope function by passing in the desired |scoring_params|. * Eliminate |search_url_database_|, which was never set to false. * DISALLOW_COPY_AND_ASSIGN(). BUG=none TEST=none Review URL: https://codereview.chromium.org/321033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276274 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Send Input Type to Suggest Servermpearson@chromium.org2014-06-102-1/+2
| | | | | | | | | | | | | This has been approved by the privacy team. I also tested this interactively (by sniffing the network traffic for various omnibox inputs). BUG=284781 Review URL: https://codereview.chromium.org/314773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276008 0039d316-1c4b-4281-b951-d872f2087c98
* Move about://-related constants from //content to //urlblundell@chromium.org2014-06-103-28/+21
| | | | | | | | | | | kAboutScheme and kAboutBlankURL are used in code shared by iOS, and are general enough to live in //url instead of //content. TBR=yoz,benm Review URL: https://codereview.chromium.org/325443002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275988 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Combine Two Input Type Enums into Onempearson@chromium.org2014-06-0819-228/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two input type enums: * one in the autocomplete code * one in the metrics code that's used for UMA logging; this one is meant to remain stable As part of fixing the linked bug, I created https://codereview.chromium.org/314773002/ whch needed an input type enum, one which would remain stable. It didn't necessarily have to be the metrics enum. After discussion with the UMA folks (who deal with how to handle stable enum problems all the time), we reached the conclusion that we should have one stable enum and use it everywhere. That's the cleanest answer. This single enum has to live in the metrics directory because metrics is a component. This change combines the two existing enums into one, putting the new enum in a new file in the metrics directory. The reason for a new file is so we can include it without include the whole OmniboxEventProto or any other metrics code. The main files to review are autocomplete_input.h and *.proto. All other changes are a mechanical result of the changes in those three files. The internal proto change has been submitted. TBR=stevenjb for the trivial change to chrome/browser/ui/app_list/search/omnibox_provider.cc that removes an unnecessary include BUG=284781 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275696 Review URL: https://codereview.chromium.org/319523005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275713 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Omnibox: Combine Two Input Type Enums into One ↵dcheng@chromium.org2014-06-0719-255/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/319523005/) Reason for revert: Broke the build on http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Mac Original issue's description: > Omnibox: Combine Two Input Type Enums into One > > There are two input type enums: > * one in the autocomplete code > * one in the metrics code that's used for UMA logging; > this one is meant to remain stable > > As part of fixing the linked bug, I created > https://codereview.chromium.org/314773002/ > whch needed an input type enum, one which would remain stable. > It didn't necessarily have to be the metrics enum. > > After discussion with the UMA folks (who deal with how to handle > stable enum problems all the time), we reached the conclusion > that we should have one stable enum and use it everywhere. That's > the cleanest answer. > > This single enum has to live in the metrics directory because metrics > is a component. > > This change combines the two existing enums into one, putting the > new enum in a new file in the metrics directory. The reason for > a new file is so we can include it without include the whole > OmniboxEventProto or any other metrics code. > > The main files to review are autocomplete_input.h and *.proto. > All other changes are a mechanical result of the changes in > those three files. > > The internal proto change has been submitted. > > TBR=stevenjb > for the trivial change to chrome/browser/ui/app_list/search/omnibox_provider.cc > that removes an unnecessary include > > BUG=284781 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275696 TBR=pkasting@chromium.org,isherman@chromium.org,mpearson@chromium.org NOTREECHECKS=true NOTRY=true BUG=284781 Review URL: https://codereview.chromium.org/320713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275706 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Combine Two Input Type Enums into Onempearson@chromium.org2014-06-0719-228/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two input type enums: * one in the autocomplete code * one in the metrics code that's used for UMA logging; this one is meant to remain stable As part of fixing the linked bug, I created https://codereview.chromium.org/314773002/ whch needed an input type enum, one which would remain stable. It didn't necessarily have to be the metrics enum. After discussion with the UMA folks (who deal with how to handle stable enum problems all the time), we reached the conclusion that we should have one stable enum and use it everywhere. That's the cleanest answer. This single enum has to live in the metrics directory because metrics is a component. This change combines the two existing enums into one, putting the new enum in a new file in the metrics directory. The reason for a new file is so we can include it without include the whole OmniboxEventProto or any other metrics code. The main files to review are autocomplete_input.h and *.proto. All other changes are a mechanical result of the changes in those three files. The internal proto change has been submitted. TBR=stevenjb for the trivial change to chrome/browser/ui/app_list/search/omnibox_provider.cc that removes an unnecessary include BUG=284781 Review URL: https://codereview.chromium.org/319523005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275696 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup AutocompleteInput and AutocompleteProvider Functionspkasting@chromium.org2014-06-0611-136/+129
| | | | | | | | | | | | | | | | | | * Make FixupUserInput() just return the fixed-up input text, since almost every caller wanted that (and the one that didn't, the HUP, will change in the future) * Make some functions which took an AutocompleteInput object and then only cared about the text() just take a string16 * Eliminated HistoryURLProvider::RunAutocompletePasses(), since it had only one caller, and just inline the code into Start(). Also got rid of the |fixup_input_and_run_pass_1| variable that was never false. BUG=none TEST=none Review URL: https://codereview.chromium.org/312423003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275540 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate the archived history database and clean up related code.engedy@chromium.org2014-06-051-2/+2
| | | | | | | | | | | | | | | More specifically, this change list: * Removes all code related to the archived history database, and removes all mentions of it from comments. * Adds some code to purge the legacy database file on disk on first start-up, plus a unit test to check that this works. * Removes a migration path from M17 which was responsible for migrating some components, all of which have been unimplemented since then, except for the archived database, which, however, is now being removed. * Removes a tiny amount of code and some mentions of a "supplementary URL index" on the URLs table (this was unimplemented a long time ago). This is needed because otherwise some updated comments would be confusing. BUG=359377 TBR=pkasting@chromium.org Review URL: https://codereview.chromium.org/235863023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275159 0039d316-1c4b-4281-b951-d872f2087c98
* Android: Eliminate alarms, downloads, and omnibox extensions code.thestig@chromium.org2014-06-056-249/+468
| | | | | | | | BUG=305852 Review URL: https://codereview.chromium.org/300573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275062 0039d316-1c4b-4281-b951-d872f2087c98
* Move kStandardSchemeSeparator from //content to //urlblundell@chromium.org2014-06-053-7/+7
| | | | | | | | | | | This constant is used in code shared by iOS, and is general enough to be placed in //url. TBR=benm,yoz Review URL: https://codereview.chromium.org/319613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275055 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate GoogleURLTracker's dependence on //chrome-level switchesblundell@chromium.org2014-06-011-0/+1
| | | | | | | | | | | | | | - switches::kGoogleBaseURL is moved into the Google component - The information of whether background networking is enabled is now obtained from GoogleURLTrackerClient. BUG=373222 TBR=thakis Review URL: https://codereview.chromium.org/301383003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274143 0039d316-1c4b-4281-b951-d872f2087c98
* Suggest about:blank autocompletion from BuiltinProvider.msw@chromium.org2014-05-312-63/+115
| | | | | | | | | | | | | | | Add support for [inline] autocomplete of about:blank. The support handles fixup of the scheme separator. Add BuiltinProviderTest.AboutBlank and do related cleanup. Update OmniboxViewTest.UndoRedo and do related cleanup. BUG=92577 TEST=about:blank is suggested in the omnibox; unit tests. R=mpearson@chromium.org,pkasting@chromium.org Review URL: https://codereview.chromium.org/290333015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274083 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Create Disable-Inlining Experimentmpearson@chromium.org2014-05-312-2/+195
| | | | | | | | | | | | | Sets up a experiment that, when active, demotes all suggestions with inline autocompletions so that a suggestion without one (or, more precisely, a suggestion with an empty inline autocompletion) appears first / within the omnibox. BUG= Review URL: https://codereview.chromium.org/303013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273966 0039d316-1c4b-4281-b951-d872f2087c98
* Make various string_util functions take StringPieces instead of char[].pkasting@chromium.org2014-05-302-3/+2
| | | | | | | | | | | | | | | This allows most callers to pass string literals or results of ASCIIToUTF16(), rather than construct error-prone character arrays that must be manually nul-terminated. Also cleans up various bits of the callers. BUG=104260 TEST=none Review URL: https://codereview.chromium.org/296593003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273765 0039d316-1c4b-4281-b951-d872f2087c98