summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
Commit message (Collapse)AuthorAgeFilesLines
* Omnibox: Prevent Asynchronous Suggestions from Changing Default Matchmpearson2014-09-031-458/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of https://codereview.chromium.org/471673002/ which was reverted because it caused a failure in interactive_ui_tests InstantExtendedPrefetchTest.SetPrefetchQuery (run #1): [ RUN ] InstantExtendedPrefetchTest.SetPrefetchQuery ../../chrome/browser/ui/search/instant_extended_interactive_uitest.cc:867: Failure Value of: SearchProvider::ShouldPrefetch(*( omnibox()->model()->result().default_match())) Actual: false Expected: true [ FAILED ] InstantExtendedPrefetchTest.SetPrefetchQuery, where TypeParam = and GetParam() = (1613 ms) http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Tests&number=12979 It has two changes: - revises the failing tests - does some requested cleanup of the unit tests The original changelist description follows: --- Calls to the suggest server may normally result in a new inline autocompletion. This can be disruptive because it means pressing enter may bring the user to different places depending on how long he/she waits after typing the last key. This change prevents new suggestions from becoming the default match. In other words, the default match is only allowed to change on a keystroke, not due to a reply coming back from the server. The consequence of this change is that if previously we'd show an inline suggestion on a server reply, now we only show it one keystroke later. I think this trade-off (one keystroke versus inconsistent omnibox behavior) is a good one to make. We still end up with default matches (inline autocompletions within the omnibox) from the suggest server after this change. Here's an example of why: User types "facebo" We send a suggest server request. Server asynchronously returns "facebook" as a top suggestion, beating the server-provided verbatim score for "facebo". We decide not to show it within the omnibox. It's instead shown somewhere in the dropdown. User types "o". We send a suggest server request. We reuse our cached suggestions and suggestion scores. <<< THE KEY We show "facebook" as an inline suggestion because it beats the default verbatim score that gets assigned to "faceboo". (This is the score that we assign by default without having yet received the most recent suggest server response.) We receive the response, which includes "facebook" as a top suggestion, beating the server-provided verbatim score for "faceboo". We show "facebook" as an inline suggestion. i.e., we decide not to demote it because it was already being shown inline TESTED: unit tests plus interactive tests (facebook.com/l, google.com/a) BUG=398135 Review URL: https://codereview.chromium.org/481693004 Cr-Commit-Position: refs/heads/master@{#293049}
* Rename AutocompleteProviderDelegate to AutocompleteProviderClientRyo Hashimoto2014-08-285-52/+51
| | | | | | | | | | | Per request by blundell@chromium.org (https://codereview.chromium.org/500023002/) BUG=388515 R=pkasting@chromium.org Review URL: https://codereview.chromium.org/510783002 Cr-Commit-Position: refs/heads/master@{#292333}
* Move bookmark_pref_names.* into bookmarks namespace.tfarina2014-08-282-3/+3
| | | | | | | | | | | BUG=370433 TEST=None R=sky@chromium.org TBR=joaodasilva@chromium.org Review URL: https://codereview.chromium.org/490123003 Cr-Commit-Position: refs/heads/master@{#292324}
* Omnibox: Make URLs of Bookmarks Searchable - Try 2mpearson2014-08-273-65/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of https://codereview.chromium.org/489373005/ which was reverted because it caused failures in interactive_ui_tests on mac on OmniboxViewTest.AcceptKeywordBySpace: https://build.chromium.org/p/chromium.mac/builders/Mac%2010.6%20Tests%20(dbg)(1)/builds/52199 See [1]. It turns out these failures were because the test uses a bookmark with no title and BookmarkProvider doesn't set classifications for these correctly. (It set the title as having a classification where, without any text, it doesn't make sense to have any classification.) This change fixes this issue and adds a test in BookmarkProvider for it. I will annotate the *second* patchset I upload with the differences between the previously-reviewed changelist and this changelist. (The first patchset has debug lines; ignore it.) Otherwise, the changelist description remains the same, which I will paste below [2]. I am marking this change as TBR=sky (because he previously reviewed this change and the new parts are not under his purview.) --- [1] OmniboxViewTest.AcceptKeywordBySpace (run #1): [ RUN ] OmniboxViewTest.AcceptKeywordBySpace [12075:263:0822/122851:ERROR:location_bar_view_mac.mm(592)] Not implemented reached in virtual void LocationBarViewMac::EndOriginChipAnimations(bool) [12075:263:0822/122852:FATAL:autocomplete_match.cc(516)] Check failed: classifications.empty(). 0 libbase.dylib 0x1ca75c5f base::debug::StackTrace::StackTrace() + 63 1 libbase.dylib 0x1ca75cbb base::debug::StackTrace::StackTrace() + 43 2 libbase.dylib 0x1cb21862 logging::LogMessage::~LogMessage() + 82 3 libbase.dylib 0x1cb2058b logging::LogMessage::~LogMessage() + 43 4 interactive_ui_tests 0x11fb469d AutocompleteMatch::ValidateClassifications(std::basic_string\u003Cunsigned short, base::string16_char_traits, std::allocator\u003Cunsigned short> > const&, std::vector\u003CAutocompleteMatch::ACMatchClassification, std::allocator\u003CAutocompleteMatch::ACMatchClassification> > const&) const + 317 5 interactive_ui_tests 0x11fb453b AutocompleteMatch::Validate() const + 107 6 interactive_ui_tests 0x11fbbb51 AutocompleteResult::Validate() const + 113 7 interactive_ui_tests 0x0d6f5a3f AutocompleteController::UpdateResult(bool, bool) + 815 8 interactive_ui_tests 0x0d6f55b7 AutocompleteController::Start(AutocompleteInput const&) + 1799 ... [2] This used to be controlled by a field trial created in https://codereview.chromium.org/184663002 After evaluating this change, we've decided to launch it. This change turns the flag on by default and removes the field trial code. It also removes the index_urls_ parameters everywhere because those will always be true forevermore. I tested this interactively. Also, all the unit tests still apparently pass. And yes some of these do exercise this feature. BUG=157204,378854 Review URL: https://codereview.chromium.org/510533002 Cr-Commit-Position: refs/heads/master@{#292243}
* Fix NULL dereference in SearchProviderTesthashimoto2014-08-272-5/+8
| | | | | | | | | BUG=407750 TEST=unit_tests Review URL: https://codereview.chromium.org/511753002 Cr-Commit-Position: refs/heads/master@{#292116}
* Componentize SearchProviderhashimoto2014-08-2713-2560/+7
| | | | | | | | | | | Move BaseSearchProvider, SearchProvider, AnswersCache to components/omnibox BUG=388515 TBR=bauerb@chromium.org for include fix in chrome/browser/android/omnibox/autocomplete_controller_android.cc Review URL: https://codereview.chromium.org/489353004 Cr-Commit-Position: refs/heads/master@{#292085}
* Remove implicit conversions from scoped_refptr to T* in ↵dcheng2014-08-264-6/+6
| | | | | | | | | | | | | chrome/browser/autocomplete/ This patch was generated by running the rewrite_scoped_refptr clang tool on a Linux build. BUG=110610 Review URL: https://codereview.chromium.org/509563002 Cr-Commit-Position: refs/heads/master@{#291958}
* Omnibox: Fix for Bookmarks With Leading Spacesmpearson2014-08-262-0/+32
| | | | | | | | | | These would cause DCHECK failures later in the system. BUG=403518 Review URL: https://codereview.chromium.org/499343004 Cr-Commit-Position: refs/heads/master@{#291924}
* Introduce AutocompleteProviderDelegatehashimoto2014-08-2610-113/+230
| | | | | | | | | | | | | This delegate isolates SearchProvider from chrome dependencies Add AutocompleteProviderDelegate and its chrome implementation ChromeAutocompleteProviderDelegate. BUG=388515 TBR=blundell@chromium.org for the new DEPS line Review URL: https://codereview.chromium.org/500023002 Cr-Commit-Position: refs/heads/master@{#291839}
* Revert of Omnibox: Make URLs of Bookmarks Searchable (patchset #2 of ↵estade@chromium.org2014-08-223-44/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/489373005/) Reason for revert: Broke interactive_ui_tests on mac: https://build.chromium.org/p/chromium.mac/builders/Mac%2010.6%20Tests%20(dbg)(1)/builds/52199 Original issue's description: > Omnibox: Make URLs of Bookmarks Searchable > > This used to be controlled by a field trial created in > https://codereview.chromium.org/184663002 > > After evaluating this change, we've decided to launch it. > This change turns the flag on by default and removes the field trial code. > It also removes the index_urls_ parameters everywhere because those will > always be true forevermore. > > I tested this interactively. > Also, all the unit tests still apparently pass. And yes some of these do > exercise this feature. > > TBR=joaodasilva > (for trivial change to components/policy/core/browser/managed_bookmarks_tracker_unittest.cc ) > > BUG=157204,378854 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291445 TBR=pkasting@google.com,sky@chromium.org,pkasting@chromium.org,mpearson@chromium.org NOTREECHECKS=true NOTRY=true BUG=157204,378854 Review URL: https://codereview.chromium.org/485483003 Cr-Commit-Position: refs/heads/master@{#291496} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291496 0039d316-1c4b-4281-b951-d872f2087c98
* Loosen DCHECK for Omnibox Extensionsmpearson@chromium.org2014-08-221-8/+15
| | | | | | | | | | | | | Omnibox extensions don't need a default match from SearchProvider, and indeed they no longer get them following some refactoring I did last week ( https://codereview.chromium.org/476263002/ ). BUG=406026 Review URL: https://codereview.chromium.org/490383002 Cr-Commit-Position: refs/heads/master@{#291461} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291461 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Make URLs of Bookmarks Searchablempearson@chromium.org2014-08-223-57/+44
| | | | | | | | | | | | | | | | | | | | | | | | This used to be controlled by a field trial created in https://codereview.chromium.org/184663002 After evaluating this change, we've decided to launch it. This change turns the flag on by default and removes the field trial code. It also removes the index_urls_ parameters everywhere because those will always be true forevermore. I tested this interactively. Also, all the unit tests still apparently pass. And yes some of these do exercise this feature. TBR=joaodasilva (for trivial change to components/policy/core/browser/managed_bookmarks_tracker_unittest.cc ) BUG=157204,378854 Review URL: https://codereview.chromium.org/489373005 Cr-Commit-Position: refs/heads/master@{#291445} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291445 0039d316-1c4b-4281-b951-d872f2087c98
* Move KeywordProvider to components/omniboxhashimoto@chromium.org2014-08-229-1085/+5
| | | | | | | | | | BUG=371538 TBR=pkasting@chromium.org for include fix in chrome/browser/ui/omnibox/omnibox_edit_model.cc Review URL: https://codereview.chromium.org/469623004 Cr-Commit-Position: refs/heads/master@{#291360} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291360 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Better prefetch cache.groby@chromium.org2014-08-226-34/+220
| | | | | | | | | | | | Step 1 - factor out current cache and increase its size. BUG=401758 R=pkasting@chromium.org Review URL: https://codereview.chromium.org/455563002 Cr-Commit-Position: refs/heads/master@{#291307} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291307 0039d316-1c4b-4281-b951-d872f2087c98
* Move string resources to omnibox_strings.grdphashimoto@chromium.org2014-08-183-4/+3
| | | | | | | | | | BUG=371538 TEST=build Review URL: https://codereview.chromium.org/450243002 Cr-Commit-Position: refs/heads/master@{#290230} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290230 0039d316-1c4b-4281-b951-d872f2087c98
* Remove protected virtual methods from BaseSearchProviderhashimoto@chromium.org2014-08-186-73/+58
| | | | | | | | | | | | | | | | | | | | | | | This change is a follow-up of https://codereview.chromium.org/436833002/. -GetTemplateURL(), GetInput() and ShouldAppendExtraParams() Instead of calling virtual methods, pass these values as arguments to AddMatchToMap() and ParseSuggestResults(). -StopSuggest() and ClearAllResults() These methods are used to customize the behavior of Stop(). Instead, define Stop() in SearchProvider and ZeroSuggestProvider. -ModifyProviderInfo() This method is only needed by ZeroSuggestProvider. Instead, ZeroSuggestProvider overrides AddProviderInfo() to do the same thing. BUG=None Review URL: https://codereview.chromium.org/456843003 Cr-Commit-Position: refs/heads/master@{#290222} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290222 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 290058 "Omnibox: Prevent Asynchronous Suggestions from Ch..."miu@chromium.org2014-08-164-515/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change closed the build tree for Linux and ChromiumOS bots due to failing interactive_ui_tests: http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Tests&number=12979 > Omnibox: Prevent Asynchronous Suggestions from Changing Default Match > > Calls to the suggest server may normally result in a new inline > autocompletion. This can be disruptive because it means pressing enter > may bring the user to different places depending on how long he/she > waits after typing the last key. > > This change prevents new suggestions from becoming the default match. > In other words, the default match is only allowed to change on a > keystroke, not due to a reply coming back from the server. > > The consequence of this change is that if previously we'd show an > inline suggestion on a server reply, now we only show it one keystroke > later. I think this trade-off (one keystroke versus inconsistent > omnibox behavior) is a good one to make. > > We still end up with default matches (inline autocompletions within > the omnibox) from the suggest server after this change. Here's an > example of why: > > User types "facebo" > We send a suggest server request. > Server asynchronously returns "facebook" as a top suggestion, > beating the server-provided verbatim score for "facebo". > We decide not to show it within the omnibox. It's instead shown > somewhere in the dropdown. > User types "o". > We send a suggest server request. > We reuse our cached suggestions and suggestion scores. <<< THE KEY > We show "facebook" as an inline suggestion because it beats > the default verbatim score that gets assigned to "faceboo". > (This is the score that we assign by default without having > yet received the most recent suggest server response.) > We receive the response, which includes "facebook" as a top > suggestion, beating the server-provided verbatim score > for "faceboo". > We show "facebook" as an inline suggestion. i.e., we decide > not to demote it because it was already being shown inline > > TESTED: > unit tests plus interactive tests (facebook.com/l, google.com/a) > > BUG=398135 > R=msw@chromium.org > > Review URL: https://codereview.chromium.org/471673002 TBR=mpearson@chromium.org Review URL: https://codereview.chromium.org/477293002 Cr-Commit-Position: refs/heads/master@{#290070} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290070 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Prevent Asynchronous Suggestions from Changing Default Matchmpearson@chromium.org2014-08-164-252/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to the suggest server may normally result in a new inline autocompletion. This can be disruptive because it means pressing enter may bring the user to different places depending on how long he/she waits after typing the last key. This change prevents new suggestions from becoming the default match. In other words, the default match is only allowed to change on a keystroke, not due to a reply coming back from the server. The consequence of this change is that if previously we'd show an inline suggestion on a server reply, now we only show it one keystroke later. I think this trade-off (one keystroke versus inconsistent omnibox behavior) is a good one to make. We still end up with default matches (inline autocompletions within the omnibox) from the suggest server after this change. Here's an example of why: User types "facebo" We send a suggest server request. Server asynchronously returns "facebook" as a top suggestion, beating the server-provided verbatim score for "facebo". We decide not to show it within the omnibox. It's instead shown somewhere in the dropdown. User types "o". We send a suggest server request. We reuse our cached suggestions and suggestion scores. <<< THE KEY We show "facebook" as an inline suggestion because it beats the default verbatim score that gets assigned to "faceboo". (This is the score that we assign by default without having yet received the most recent suggest server response.) We receive the response, which includes "facebook" as a top suggestion, beating the server-provided verbatim score for "faceboo". We show "facebook" as an inline suggestion. i.e., we decide not to demote it because it was already being shown inline TESTED: unit tests plus interactive tests (facebook.com/l, google.com/a) BUG=398135 R=msw@chromium.org Review URL: https://codereview.chromium.org/471673002 Cr-Commit-Position: refs/heads/master@{#290058} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290058 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox - Search Provider - Cleanup Keyword Mode's Legal Matchesmpearson@chromium.org2014-08-156-50/+34
| | | | | | | | | | | | | | | | | | | | | | | SearchProvider enforces that if the user is in keyword mode, the only suggestions allowed to be the default match are keyword mode suggestions, lest they break the user out of keyword mode. Previously, this constraint was applied with an after-the-fact correction to allowed_to_be_default_match. This change sets allowed_to_be_default_match correctly when the AutocompleteMatches are created. All tests pass. (And yes, this constraint enforcement is tested. Here you can see the tests that were added when the constraint was put in place: https://codereview.chromium.org/67693004 .) BUG=398135 R=msw@chromium.org Review URL: https://codereview.chromium.org/476263002 Cr-Commit-Position: refs/heads/master@{#289981} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289981 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Reuse previous answer for verbatim.groby@chromium.org2014-08-151-4/+19
| | | | | | | | | | | | | Verbatim queries do not see an answer. If the previous query had an answer with a suggestion that matches the current verbatim text, reuse that answer. BUG=401486 Review URL: https://codereview.chromium.org/462963002 Cr-Commit-Position: refs/heads/master@{#289959} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289959 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize AutocompleteResulthashimoto@chromium.org2014-08-1413-1524/+10
| | | | | | | | | | | BUG=388504 TEST=build TBR=sky@chromium.org for include fix under chrome/browser Review URL: https://codereview.chromium.org/470523002 Cr-Commit-Position: refs/heads/master@{#289619} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289619 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."brettw@chromium.org2014-08-133-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace > > Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is > generally a NOP but will allow me to delete the other 4 variants in a followup > (wanted to do that separately since that will require more review, since > callsites will be changed in nontrivial ways). > > In some cases, LowerCaseEqualsASCII is called with a WebString, which no > longer is implicitly converted. I added base::string16(...) around such > calls to force the right conversion. It happened in these files: > window_container_type.cc > savable_resources.cc > render_view_impl.cc > blink_ax_tree_source.cc > password_form_conversion_utils.cc > translate_helper.cc > chrome_render_view_observer.cc > dom_serializer_browsertest.cc > > R=jamesr@chromium.org > > Review URL: https://codereview.chromium.org/448143008 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/474483002 Cr-Commit-Position: refs/heads/master@{#289320} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289320 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespacebrettw@chromium.org2014-08-133-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is generally a NOP but will allow me to delete the other 4 variants in a followup (wanted to do that separately since that will require more review, since callsites will be changed in nontrivial ways). In some cases, LowerCaseEqualsASCII is called with a WebString, which no longer is implicitly converted. I added base::string16(...) around such calls to force the right conversion. It happened in these files: window_container_type.cc savable_resources.cc render_view_impl.cc blink_ax_tree_source.cc password_form_conversion_utils.cc translate_helper.cc chrome_render_view_observer.cc dom_serializer_browsertest.cc R=jamesr@chromium.org Review URL: https://codereview.chromium.org/448143008 Cr-Commit-Position: refs/heads/master@{#289312} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289312 0039d316-1c4b-4281-b951-d872f2087c98
* No chrome dependencies in KeywordProviderhashimoto@chromium.org2014-08-138-64/+47
| | | | | | | | | | | | Profile related business is handled by KeywordExtensionsDelegateImpl. BUG=388515 TEST=unit_tests Review URL: https://codereview.chromium.org/460313002 Cr-Commit-Position: refs/heads/master@{#289248} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289248 0039d316-1c4b-4281-b951-d872f2087c98
* Move ShouldHideTopVerbatimMatch to components/searchhashimoto@chromium.org2014-08-121-1/+1
| | | | | | | | | | | | To remove chrome/ dependency from AutocompleteResult BUG=388504 TEST=components_unittest --gtest_filter="ShouldHideTopVerbatimTest.*" Review URL: https://codereview.chromium.org/450663002 Cr-Commit-Position: refs/heads/master@{#288958} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288958 0039d316-1c4b-4281-b951-d872f2087c98
* Stop sharing BaseSearchProvider::OnURLFetchComplete between 2 providershashimoto@chromium.org2014-08-116-224/+180
| | | | | | | | | | | | | | | Sharing BaseSearchProvider::OnURLFetchComplete() between SearchProvider and ZeroSuggestProvider requires both providers to inherit a lot of virtual methods to customize the method's behavior. This makes it difficult to track the code path to understand what is happening in OnURLFetchComplete with each provider. Since SearchSuggestionParser was introduced and OnURLFetchComplete became slimmer, it's simpler to have OnURLFetchComplete() implementations in each provider and remove virtual protected methods. BUG=None Review URL: https://codereview.chromium.org/436833002 Cr-Commit-Position: refs/heads/master@{#288675} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288675 0039d316-1c4b-4281-b951-d872f2087c98
* Stop depending on content/public/common/url_constants.h from ↵hashimoto@chromium.org2014-08-111-5/+3
| | | | | | | | | | | | | | autocomplete_result.cc Add url_fixer::IsEquivalentScheme(). Fix indent in url_fixer.h. BUG=388504 Review URL: https://codereview.chromium.org/445353002 Cr-Commit-Position: refs/heads/master@{#288672} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288672 0039d316-1c4b-4281-b951-d872f2087c98
* Offload the dependency of autocomplete_result_unittest.ccmukai@chromium.org2014-08-111-56/+41
| | | | | | | | | | | BUG=None R=hashimoto@chromium.org, pkasting@chromium.org TEST=unit_tests Review URL: https://codereview.chromium.org/455893002 Cr-Commit-Position: refs/heads/master@{#288662} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288662 0039d316-1c4b-4281-b951-d872f2087c98
* Stop depending on content::RecordAction from chrome/browser/autocompletehashimoto@chromium.org2014-08-112-6/+6
| | | | | | | | | BUG=388515 Review URL: https://codereview.chromium.org/452053002 Cr-Commit-Position: refs/heads/master@{#288652} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288652 0039d316-1c4b-4281-b951-d872f2087c98
* Fix misspelling.groby@chromium.org2014-08-091-1/+1
| | | | | | | | | | | BUG=none R=pkasting@chromium.org TBR=pkasting@chromium.org Review URL: https://codereview.chromium.org/455063003 Cr-Commit-Position: refs/heads/master@{#288522} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288522 0039d316-1c4b-4281-b951-d872f2087c98
* Move OmniboxFieldTrial to components/omniboxhashimoto@chromium.org2014-08-0813-13/+14
| | | | | | | | | | | | | Move omnibox_field_trial{.cc,.h,_unittest.cc} to components/omnibox. Add components/omnibox/omnibox_switches.{cc,h} BUG=371538 TBR=sky@chromium.org for include fix under chrome/browser. Review URL: https://codereview.chromium.org/447183003 Cr-Commit-Position: refs/heads/master@{#288315} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288315 0039d316-1c4b-4281-b951-d872f2087c98
* Rename components/autocomplete to components/omniboxhashimoto@chromium.org2014-08-0738-82/+82
| | | | | | | | | | | | | | components/omnibox will be the directory to which code under chrome/browser/{autocomplete,omnibox} will move. (https://codereview.chromium.org/415073003#msg7) BUG=371538 TEST=build R=blundell@chromium.org, pkasting@chromium.org TBR=mukai@chromium.org for athena/, sky@chromium.org for include fix under chrome/ Review URL: https://codereview.chromium.org/443043003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288038 0039d316-1c4b-4281-b951-d872f2087c98
* Remove OmniboxHUPCullRedirects and OmniboxHUPCreateShorterMatch trialsholte@chromium.org2014-08-072-24/+3
| | | | | | | | BUG=401218 Review URL: https://codereview.chromium.org/446973003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287960 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox: Make Exact Match Tab-to-Search Workmpearson@chromium.org2014-08-062-28/+104
| | | | | | | | | | Tested interactively and adds unit test. Seems to behave as expected. BUG=47572 Review URL: https://codereview.chromium.org/440753003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287807 0039d316-1c4b-4281-b951-d872f2087c98
* Stop depending on TemplateURLServiceFactory from SearchProviderhashimoto@chromium.org2014-08-059-55/+66
| | | | | | | | BUG=388515 Review URL: https://codereview.chromium.org/439243004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287487 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize AutocompleteProviderListenerhashimoto@chromium.org2014-08-0312-41/+11
| | | | | | | | | BUG=388515 TEST=build Review URL: https://codereview.chromium.org/437793002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287258 0039d316-1c4b-4281-b951-d872f2087c98
* Move DeserializeJsonData() and UTF-8 conversion code to SearchSuggestionParserhashimoto@chromium.org2014-07-315-65/+16
| | | | | | | | | | | | Move BaseSearchProvider::DeserializeJsonData() and UTF-8 conversion code to SearchSuggestionParser. To reduce the number of arguments of ParseSuggestResults(), add relevances_from_server and answers_image_urls to SearchSuggestionParser::Results. BUG=388515 TEST=build Review URL: https://codereview.chromium.org/423093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286777 0039d316-1c4b-4281-b951-d872f2087c98
* Move extension notifications to extensions/browser/notification_types.hjamescook@chromium.org2014-07-313-15/+19
| | | | | | | | | | | | | | | | | | As part of the extensions module refactor we temporarily allowed the use of chrome_notification_types.h in src/extensions. However, this allowed code moving into src/extensions to listen to notifications from Chrome, which was a layering violation. This CL moves all the extensions notifications into their own header and cleans up DEPS to disallow the exception. BUG=392622 TEST=compiles, unit_tests, browser_tests, extensions_unittests TBR=miket@chromium.org for apps/ Review URL: https://codereview.chromium.org/425303002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286770 0039d316-1c4b-4281-b951-d872f2087c98
* Split BaseSearchProvider's server response parser code as a separate classhashimoto@chromium.org2014-07-307-749/+138
| | | | | | | | | | | | | Add a new class SearchSuggestionParser. Move structs (Result, SuggestResult, NavigationResult and results) from BaseSearchProvider to SearchSuggestionParser. Move functions (ParseSuggestReulsts() and PrefetchAnswersImages()) to SearchSuggestionParser. BUG=388515 TEST=build Review URL: https://codereview.chromium.org/417143002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286489 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize AutocompleteMatch and AutocompleteProviderhashimoto@chromium.org2014-07-3034-1535/+41
| | | | | | | | | | | | | | | | Move AutocompleteMatch and AutocompleteProvider to comopnents/autocomplete. Fix gyp and GN files. Add DEPS rules to components/autocomplete/DEPS. TBR=sky@chromium.org for include fix and GN fix under chrome/browser TBR=sdefresne@chromium.org for chrome/browser/history/DEPS TBR=blundell@chromium.org for the components.gyp change to exclude autocomplete for AOSP BUG=388510,388515 TEST=build Review URL: https://codereview.chromium.org/426943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286448 0039d316-1c4b-4281-b951-d872f2087c98
* [AiS] Support prefetch query.groby@chromium.org2014-07-304-1/+104
| | | | | | | | | | | | | | | | | | | Answers needs to signal to search if there is a reasonable guess at the full query text. For this purpose, it will set pfq= to the full query text and qha= to the answers type. A "reasonable guess" is given if the current query text is a strict prefix of the full query text of an Answer that has been displayed before, iff that Answer has occupied the top slot/second slot. Currently, the cache of answers displayed before is one element deep. R=pkasting@chromium.org BUG=370192 Review URL: https://codereview.chromium.org/420723007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286413 0039d316-1c4b-4281-b951-d872f2087c98
* Use content::BrowserContext where possible in c/b/custom_handler, ↵oshima@chromium.org2014-07-291-2/+2
| | | | | | | | | | | c/b/ui/content_settings BUG=397320 R=sky@chromium.org Review URL: https://codereview.chromium.org/429003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286341 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Fix the handling of user gestures for external protocol handler ↵meacer@chromium.org2014-07-291-5/+1
| | | | | | | | | | | | | | | | | | | | | | | dialogs. (https://codereview.chromium.org/131783012/) Reason for revert: This change broke certain cases where external protocol handlers are launched. Consider relanding depending on whether http://crbug.com/78592 is to be fixed. Original issue's description: > Fix the handling of user gestures for external protocol handler dialogs. > > - Remove browser state from external protocol handler. > - Use gesture with a timeout. > > BUG=173557 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261014 TBR=boliu@chromium.org Review URL: https://codereview.chromium.org/426713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286301 0039d316-1c4b-4281-b951-d872f2087c98
* Move omnibox icons to components (2/2)hashimoto@chromium.org2014-07-291-1/+1
| | | | | | | | | | | | | | | | | To stop depending on resources under chrome/ from AutocompleteMatch. Move 3 icons from chrome/ to components/. BUG=388510 TEST=build R=blundell@chromium.org, oshima@chromium.org, pkasting@chromium.org TBR=sky@chromium.org for GN fix Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286120 Review URL: https://codereview.chromium.org/415973005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286167 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 286120 "Move omnibox icons to components (2/2)"hashimoto@chromium.org2014-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | > Move omnibox icons to components (2/2) > > To stop depending on resources under chrome/ from AutocompleteMatch. > > Move 3 icons from chrome/ to components/. > > BUG=388510 > TEST=build > R=blundell@chromium.org, oshima@chromium.org, pkasting@chromium.org > > Review URL: https://codereview.chromium.org/415973005 TBR=hashimoto@chromium.org Review URL: https://codereview.chromium.org/424073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286125 0039d316-1c4b-4281-b951-d872f2087c98
* Move omnibox icons to components (2/2)hashimoto@chromium.org2014-07-291-1/+1
| | | | | | | | | | | | | | To stop depending on resources under chrome/ from AutocompleteMatch. Move 3 icons from chrome/ to components/. BUG=388510 TEST=build R=blundell@chromium.org, oshima@chromium.org, pkasting@chromium.org Review URL: https://codereview.chromium.org/415973005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286120 0039d316-1c4b-4281-b951-d872f2087c98
* Remove AutocompleteMatch::is_starredhashimoto@chromium.org2014-07-2910-37/+6
| | | | | | | | | | | Instead of letting every AutocompleteProvider implementation depend on BookmarkModel, let OmniboxPopupModel and others take the responsibility to check the bookmark status. BUG=388515 Review URL: https://codereview.chromium.org/415053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286110 0039d316-1c4b-4281-b951-d872f2087c98
* Move omnibox icons to components (1/2)hashimoto@chromium.org2014-07-282-12/+0
| | | | | | | | | | | | | | To stop depending on resources under chrome/ from AutocompleteMatch. Add a new file autocomplete_scaled_resources.grdp. Inline AutocompleteMatch::TypeToLocationBarIcon() to its exclusive user omnibox_view.cc. BUG=388510 TEST=build Review URL: https://codereview.chromium.org/415073003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285870 0039d316-1c4b-4281-b951-d872f2087c98
* Move variations component code to variations namespace.asvitkine@chromium.org2014-07-263-8/+8
| | | | | | | | | | | | This is a re-land of https://codereview.chromium.org/412943002/ which broke on the official builder. BUG=284540 TBR=sky@chromium.org, mathp@chromium.org, jwd@chromium.org Review URL: https://codereview.chromium.org/421663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285778 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 285657 "Move variations component code to variations name..."mpearson@chromium.org2014-07-253-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Causes compile failures on official builders: http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/25600 http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20ChromeOS/builds/70014 FAILED: ninja -t msvc -e environment.x86 -- c:\b\build\goma/gomacc "c:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\chrome\browser\profile_resetter\browser_0.automatic_profile_resetter.obj.rsp /c ..\..\chrome\browser\profile_resetter\automatic_profile_resetter.cc /Foobj\chrome\browser\profile_resetter\browser_0.automatic_profile_resetter.obj /Fdobj\chrome\browser_0.cc.pdb c:\b\build\slave\google-chrome-rel-win\build\src\chrome\browser\profile_resetter\automatic_profile_resetter.cc(109) :error C2039: 'GetVariationParams' : is not a member of 'chrome_variations' c:\b\build\slave\google-chrome-rel-win\build\src\chrome\browser\profile_resetter\automatic_profile_resetter.cc(109) :error C3861: 'GetVariationParams': identifier not found ninja: build stopped: subcommand failed. FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/profile_resetter/browser.automatic_profile_resetter.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DGOOGLE_CHROME_BUILD -DCR_CLANG_REVISION=209387 -DENABLE_RLZ -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_X11=1 -DUSE_XI2_MT=2 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DUSE_UDEV -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PROD_WALLET_SERVICE=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DCLD2_DATA_SOURCE=static -DCLD_DATA_FROM_STATIC -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DNACL_WINDOWS=0 -DNACL_LINUX=1 -DNACL_OSX=0 -DNACL_ANDROID=0 -DNACL_TARGET_SUBARCH=64 -DNACL_TARGET_ARCH=x86 -DNACL_BUILD_SUBARCH=64 -DNACL_BUILD_ARCH=x86 -DFULL_SAFE_BROWSING -DGL_GLEXT_PROTOTYPES -DMOJO_USE_SYSTEM_IMPL -DLIBPEERCONNECTION_LIB=1 -DUSE_BRLAPI -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DAUTOFILL_ENABLE_SYNC -DPASSWORD_MANAGER_ENABLE_SYNC '-DPRECACHE_CONFIG_SETTINGS_URL="http://www.gstatic.com/chrome/wifiprefetch/precache_config"' '-DPRECACHE_MANIFEST_URL_PREFIX="http://www.gstatic.com/chrome/wifiprefetch/precache_manifest_"' -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_SUPPORT_LEGACY_PICTURE_CLONE -DSK_SUPPORT_LEGACY_GETDEVICE -DSK_IGNORE_ETC1_SUPPORT -DSK_IGNORE_GPU_DITHER -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DLINUX -DPOSIX -DCHROMEOS -DLIBXML_STATIC '-DI18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-aggregate-address/"' -DI18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_LINUX -DWEBRTC_POSIX -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DRLZ_NETWORK_IMPLEMENTATION_CHROME_NET -DUSE_NSS=1 -DOS_CHROMEOS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DOFFICIAL_BUILD -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -Iobj/chrome/browser.gen -Iobj/chrome/browser.gen/chrome -I../../skia/config -I../../third_party/khronos -I../../gpu -I../../third_party/WebKit/Source -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/dom_distiller_js/package/proto_gen -Igen/chrome -Igen/components/strings -I../../third_party/WebKit -I../../net/third_party/nss/ssl -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/cacheinvalidation/google/cacheinvalidation -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../third_party/webrtc/overrides -I../../testing/gtest/include -I../../third_party -I../../third_party/webrtc -I../../third_party/libxml/linux/include -I../../third_party/libxml/src/include -I../../third_party/zlib -Igen/ui/resources -Igen/ui/strings -I../../third_party/re2 -I../../third_party/leveldatabase/src/include -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase -I../../third_party/libaddressinput/chromium/override -I../../third_party/libaddressinput/src/cpp/include -Igen/third_party/libaddressinput/ -I../../third_party/libyuv/include -I../../third_party/libyuv -I../../third_party/npapi -I../../third_party/npapi/bindings -Igen/ui/gl -I../../third_party/mesa/src/include -I../../v8/include -Igen/webkit -Igen/policy -Igen/ui/chromeos/resources -Werror -pthread -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-deprecated-register -Xclang -load -Xclang /b/build/slave/google-chrome-rel-chromeos/build/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -g -B/b/build/slave/google-chrome-rel-chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/nss -I/usr/include/nspr -Wno-header-guard -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -Wexit-time-destructors -m64 -march=x86-64 -O2 -fdata-sections -ffunction-sections -fno-slp-vectorize -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -c ../../chrome/browser/profile_resetter/automatic_profile_resetter.cc -o obj/chrome/browser/profile_resetter/browser.automatic_profile_resetter.o ../../chrome/browser/profile_resetter/automatic_profile_resetter.cc:109:3:error: no member named 'GetVariationParams' in namespace 'chrome_variations'; did you mean 'variations::GetVariationParams'? chrome_variations::GetVariationParams(kAutomaticProfileResetStudyName, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ variations::GetVariationParams ../../components/variations/variations_associated_data.h:110:6: note: 'variations::GetVariationParams' declared here bool GetVariationParams(const std::string& trial_name, ^ 1 error generated. ninja: build stopped: subcommand failed. > Move variations component code to variations namespace. > > BUG=284540 > TBR=sky@chromium.org, mathp@chromium.org > > Review URL: https://codereview.chromium.org/412943002 TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/416333008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285675 0039d316-1c4b-4281-b951-d872f2087c98