Description[Omnibox] Changing protocol scheme from https:// to http:// results in DCHECK (Always).
With present implementation, for giving scores to the history urls based on
supplied term string, it calculates word start offsets for each term (word).
However cases where term do not having word-part set to zero (as default). This
leads to DCHECK(at_word_boundary) fail in later part execution inside
ScoredHistoryMatch::GetTopicalityScore(). For example, term string "http ://",
both the terms {"http", "://"} are offsets to {0, 0}.
This patch, sets the missing word-parts start offset to the size of the term
(word), i.e. for terms {"http", "://"} sets start offsets to {0, 3}, avoiding
this DCHECK failure.
BUG=495571
TEST=InMemoryURLIndexTest.AddHistoryMatch
----- NOT FOR REVIEW JUST TO VERIFY BUILDS -----
Patch Set 1 : #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : Test 1292693004. #Patch Set 8 : test #Patch Set 9 : 497630 Part 1. #Patch Set 10 : 497630 Part 2. #Patch Set 11 : #Patch Set 12 : #Patch Set 13 : #
Messages
Total messages: 10 (10 generated)
|