summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_browser.gypi
diff options
context:
space:
mode:
authorhuangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 01:48:51 +0000
committerhuangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 01:48:51 +0000
commit420e6d9eda84004a3abe49af74e246f88f37a64b (patch)
treecd44e2d6f39a0e2fe9e51e470f86747e7003ac77 /chrome/chrome_browser.gypi
parent110babd3c23b9d7fde9030929227ce3058ea6d01 (diff)
downloadchromium_src-420e6d9eda84004a3abe49af74e246f88f37a64b.zip
chromium_src-420e6d9eda84004a3abe49af74e246f88f37a64b.tar.gz
chromium_src-420e6d9eda84004a3abe49af74e246f88f37a64b.tar.bz2
Implementing URL prefix match for history thumbnail cache.
We wish to make MostLikely URL recommendations use local thumbnail. To increase the likelihood of a hit, this CL enables a thumbnail request to perform URL prefix match. For example, if thumbnail is stored for ==> http://www.chromium.org/Home but not ==> http://www.chromium.org/ then previously the request ==> chrome://thumb/http://www.chromium.org/ would fail. This CL aims to create a fallback, by adding "thumb2" that matches prefix, i.e.: ==> chrome://thumb2/http://www.chromium.org/ would match "http://www.chromium.org/Home" and display the corresponding thumbnail. Details: - We consider "URL prefix" match, which is not same as "string prefix" match. Specifics: --- Need identical protocol/scheme, host, and port (GURL is smart about this). --- Query strings are ignored. --- For path, we require entire path components to match. E.g., "base/test" is a prefix of "base/test/sub", but is NOT a prefix of "base/testing" or "best/test-case". - If multiple matches exist, the first URL-lexicographical match is taken. This allows the "nearest" children to be matched, but favors siblings that are alphabetically closer. For example, "base" prefers "base/test" over "base/test/sub", but also prefers "base/deep/sub/dir/" over "base/test" (since "deep" < "test"). - To implement the above match, a new comparator is used in the thumbnail cache. - Adding new test TopSitesCacheTest, which also tests existing code. - Adding url_utils.cc in chrome\browser\history, along with unit tests. - Adding the "chrome://thumb2" path, which causes most of the 1-2-line changes in files. BUG=284634 TEST=TopSitesCacheTest.* Review URL: https://chromiumcodereview.appspot.com/23477033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_browser.gypi')
-rw-r--r--chrome/chrome_browser.gypi2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 5eef42c..ae5a18f 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -823,6 +823,8 @@
'browser/history/url_database.h',
'browser/history/url_index_private_data.cc',
'browser/history/url_index_private_data.h',
+ 'browser/history/url_utils.cc',
+ 'browser/history/url_utils.h',
'browser/history/visit_database.cc',
'browser/history/visit_database.h',
'browser/history/visit_filter.cc',