summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 23:32:47 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 23:32:47 +0000
commit6d87d61d30acf85de04e788187778f87bafcd818 (patch)
tree12e9ea962b57c84c83fdee6ea41afc8c7c5b8307 /chrome/browser/history
parenta4ae7db11300ea8d5a57367ae6a742474be2684e (diff)
downloadchromium_src-6d87d61d30acf85de04e788187778f87bafcd818.zip
chromium_src-6d87d61d30acf85de04e788187778f87bafcd818.tar.gz
chromium_src-6d87d61d30acf85de04e788187778f87bafcd818.tar.bz2
History provider: style cleanup
BUG=none TEST=it compiles Review URL: http://codereview.chromium.org/3177020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/history_types.cc8
-rw-r--r--chrome/browser/history/history_types.h74
2 files changed, 1 insertions, 81 deletions
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index 305fa35..6454df6 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -238,10 +238,4 @@ void QueryResults::AdjustResultMap(size_t begin, size_t end, ptrdiff_t delta) {
}
}
-Time AutocompleteAgeThreshold() {
- Time recent_threshold =
- Time::Now() - TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays);
- return recent_threshold;
-}
-
} // namespace history
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 21e8067..50c0f0d 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -540,80 +540,6 @@ struct Images {
typedef std::vector<MostVisitedURL> MostVisitedURLList;
-// Used for intermediate history result operations.
-struct HistoryMatch {
- // Required for STL, we don't use this directly.
- HistoryMatch()
- : url_info(),
- input_location(std::wstring::npos),
- match_in_scheme(false),
- innermost_match(true) {
- }
-
- HistoryMatch(const URLRow& url_info,
- size_t input_location,
- bool match_in_scheme,
- bool innermost_match)
- : url_info(url_info),
- input_location(input_location),
- match_in_scheme(match_in_scheme),
- innermost_match(innermost_match) {
- }
-
- bool operator==(const GURL& url) const {
- return url_info.url() == url;
- }
-
- URLRow url_info;
-
- // The offset of the user's input within the URL.
- size_t input_location;
-
- // Whether this is a match in the scheme. This determines whether we'll go
- // ahead and show a scheme on the URL even if the user didn't type one.
- // If our best match was in the scheme, not showing the scheme is both
- // confusing and, for inline autocomplete of the fill_into_edit, dangerous.
- // (If the user types "h" and we match "http://foo/", we need to inline
- // autocomplete that, not "foo/", which won't show anything at all, and
- // will mislead the user into thinking the What You Typed match is what's
- // selected.)
- bool match_in_scheme;
-
- // A match after any scheme/"www.", if the user input could match at both
- // locations. If the user types "w", an innermost match ("website.com") is
- // better than a non-innermost match ("www.google.com"). If the user types
- // "x", no scheme in our prefix list (or "www.") begins with x, so all
- // matches are, vacuously, "innermost matches".
- bool innermost_match;
-};
-typedef std::deque<HistoryMatch> HistoryMatches;
-
-struct Prefix {
- Prefix(std::wstring const& prefix, int num_components)
- : prefix(prefix),
- num_components(num_components) {}
-
- std::wstring prefix;
-
- // The number of "components" in the prefix. The scheme is a component,
- // and the initial "www." or "ftp." is a component. So "http://foo.com"
- // and "www.bar.com" each have one component, "ftp://ftp.ftp.com" has two,
- // and "mysite.com" has none. This is used to tell whether the user's
- // input is an innermost match or not. See comments in HistoryMatch.
- int num_components;
-};
-typedef std::vector<Prefix> Prefixes;
-
-// Constants which specify, when considered altogether, 'significant'
-// history items. These are used to filter out insignificant items
-// for consideration as autocomplete candidates.
-const int kLowQualityMatchTypedLimit = 1;
-const int kLowQualityMatchVisitLimit = 3;
-const int kLowQualityMatchAgeLimitInDays = 3;
-
-// Returns the date threshold for considering an history item as significant.
-base::Time AutocompleteAgeThreshold();
-
} // namespace history
#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_