OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/autocomplete/history_provider_util.h" |
| 6 |
| 7 namespace history { |
| 8 |
| 9 const int kLowQualityMatchTypedLimit = 1; |
| 10 const int kLowQualityMatchVisitLimit = 3; |
| 11 const int kLowQualityMatchAgeLimitInDays = 3; |
| 12 |
| 13 HistoryMatch::HistoryMatch() |
| 14 : url_info(), |
| 15 input_location(std::wstring::npos), |
| 16 match_in_scheme(false), |
| 17 innermost_match(true) { |
| 18 } |
| 19 |
| 20 HistoryMatch::HistoryMatch(const URLRow& url_info, |
| 21 size_t input_location, |
| 22 bool match_in_scheme, |
| 23 bool innermost_match) |
| 24 : url_info(url_info), |
| 25 input_location(input_location), |
| 26 match_in_scheme(match_in_scheme), |
| 27 innermost_match(innermost_match) { |
| 28 } |
| 29 |
| 30 bool HistoryMatch::operator==(const GURL& url) const { |
| 31 return url_info.url() == url; |
| 32 } |
| 33 |
| 34 base::Time AutocompleteAgeThreshold() { |
| 35 return (base::Time::Now() - |
| 36 base::TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays)); |
| 37 } |
| 38 |
| 39 } |
OLD | NEW |