Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Issue 1968303002: Support inexact path matching when extracting terms from Template URL. (Closed)

Created:
4 years, 7 months ago by Vitaly Baranov
Modified:
4 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support inexact path matching when extracting terms from Template URL. This adds pattern {google:ignorePathEnding} which can be used for writing alternate URLs to avoid exact path matching. For example, http://foo/search/{searchTerms}/extra/{google:ignorePathEnding} BUG=611265 TEST=components_unittests:TemplateURLTest.HostAndSearchTermKey, ExtractSearchTermsFromURLPath R=pkasting@chromium.org

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -93 lines) Patch
M components/search_engines/template_url.h View 3 chunks +28 lines, -7 lines 0 comments Download
M components/search_engines/template_url.cc View 11 chunks +137 lines, -34 lines 0 comments Download
M components/search_engines/template_url_unittest.cc View 2 chunks +145 lines, -52 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 4 (0 generated)
Vitaly Baranov
4 years, 7 months ago (2016-05-12 01:40:57 UTC) #1
Peter Kasting
See discussion on bug.
4 years, 7 months ago (2016-05-12 11:32:13 UTC) #2
Vitaly Baranov
On 2016/05/12 11:32:13, Peter Kasting wrote: > See discussion on bug. I think some parts ...
4 years, 7 months ago (2016-05-12 12:43:28 UTC) #3
Vitaly Baranov
4 years, 7 months ago (2016-05-12 15:16:23 UTC) #4
On 2016/05/12 12:43:28, Vitaly Baranov wrote:
> On 2016/05/12 11:32:13, Peter Kasting wrote:
> > See discussion on bug.
> 
> I think some parts of this CL could be useful as refactoring even without
adding
> the "{google:ignorePathEnding}" pattern. I mean the following changes:
> 1) remove variable TemplateURLRef::search_term_position_in_path_ because
> search_term_value_prefix_ & search_term_value_suffix_ can be used instead.
> 2) rewrite FindSearchTermsInPath() for consistency with FindSearchTermsKey()
> which was recently rewritten in
>
https://codereview.chromium.org/1902263002/diff/20001/components/search_engin...
> 3) combine two tests TemplateURLTest.HostAndSearchTermKey and
> TemplateURLTest.SearchTermKeyLocation into a single extended test with more
test
> cases added.
> 4) fix minor bug in TemplateURLRef::InvalidateCachedValues().

Please take a look at https://codereview.chromium.org/1978553002/

Powered by Google App Engine
This is Rietveld 408576698