Commit aabf8213 authored by mpearson@chromium.org's avatar mpearson@chromium.org

Omnibox: HistoryQuick Provider: Index Farther Into URL and Title

Record word break information for the first 200 characters in a URL or
title, not the first 50 characters.  This is important because we
generally drop URL suggestions that we think do not match at a word
break.

Tested locally on a longer URL from the bug.

TBR=sky
(because this change is trivial)

BUG=291294

Review URL: https://codereview.chromium.org/306963002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273837 0039d316-1c4b-4281-b951-d872f2087c98
parent 1b931eaa
......@@ -17,7 +17,7 @@ namespace history {
// The maximum number of characters to consider from an URL and page title
// while matching user-typed terms.
const size_t kMaxSignificantChars = 50;
const size_t kMaxSignificantChars = 200;
// Matches within URL and Title Strings ----------------------------------------
......
......@@ -69,7 +69,7 @@ TEST_F(InMemoryURLIndexTypesTest, StaticFunctions) {
string_vec = String16VectorFromString16(string_c, false, &actual_starts_c);
ASSERT_EQ(8U, string_vec.size());
// Note that we stop collecting words and word starts at kMaxSignificantChars.
size_t expected_starts_c[] = {1, 7, 16, 22, 32, 43};
size_t expected_starts_c[] = {1, 7, 16, 22, 32, 43, 52, 55};
EXPECT_TRUE(IntArraysEqual(expected_starts_c, arraysize(expected_starts_c),
actual_starts_c));
......
......@@ -33,7 +33,7 @@ class InMemoryURLIndex;
class RefCountedBool;
// Current version of the cache file.
static const int kCurrentCacheFileVersion = 4;
static const int kCurrentCacheFileVersion = 5;
// A structure private to InMemoryURLIndex describing its internal data and
// providing for restoring, rebuilding and updating that internal data. As
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment