OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/history/core/browser/url_database.h" | 5 #include "components/history/core/browser/url_database.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/i18n/case_conversion.h" | 11 #include "base/i18n/case_conversion.h" |
| 12 #include "base/macros.h" |
12 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
14 #include "components/history/core/browser/keyword_search_term.h" | 15 #include "components/history/core/browser/keyword_search_term.h" |
15 #include "components/url_formatter/url_formatter.h" | 16 #include "components/url_formatter/url_formatter.h" |
16 #include "sql/statement.h" | 17 #include "sql/statement.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 | 19 |
19 namespace history { | 20 namespace history { |
20 | 21 |
21 const char URLDatabase::kURLRowFields[] = HISTORY_URL_ROW_FIELDS; | 22 const char URLDatabase::kURLRowFields[] = HISTORY_URL_ROW_FIELDS; |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 bool RowQualifiesAsSignificant(const URLRow& row, | 628 bool RowQualifiesAsSignificant(const URLRow& row, |
628 const base::Time& threshold) { | 629 const base::Time& threshold) { |
629 const base::Time& real_threshold = | 630 const base::Time& real_threshold = |
630 threshold.is_null() ? AutocompleteAgeThreshold() : threshold; | 631 threshold.is_null() ? AutocompleteAgeThreshold() : threshold; |
631 return (row.typed_count() >= kLowQualityMatchTypedLimit) || | 632 return (row.typed_count() >= kLowQualityMatchTypedLimit) || |
632 (row.visit_count() >= kLowQualityMatchVisitLimit) || | 633 (row.visit_count() >= kLowQualityMatchVisitLimit) || |
633 (row.last_visit() >= real_threshold); | 634 (row.last_visit() >= real_threshold); |
634 } | 635 } |
635 | 636 |
636 } // namespace history | 637 } // namespace history |
OLD | NEW |