| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/scored_history_match.h" | 5 #include "chrome/browser/autocomplete/scored_history_match.h" |
| 6 | 6 |
| 7 namespace history { | 7 namespace history { |
| 8 | 8 |
| 9 // static | 9 // static |
| 10 const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10; | 10 const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10; |
| 11 | 11 |
| 12 ScoredHistoryMatch::ScoredHistoryMatch() : raw_score(0), can_inline(false) { | 12 ScoredHistoryMatch::ScoredHistoryMatch() : raw_score(0), can_inline(false) { |
| 13 } | 13 } |
| 14 | 14 |
| 15 ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& url_info, | 15 ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& url_info, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // URLs that have been visited more often are better. | 64 // URLs that have been visited more often are better. |
| 65 if (m1.url_info.visit_count() != m2.url_info.visit_count()) | 65 if (m1.url_info.visit_count() != m2.url_info.visit_count()) |
| 66 return m1.url_info.visit_count() > m2.url_info.visit_count(); | 66 return m1.url_info.visit_count() > m2.url_info.visit_count(); |
| 67 | 67 |
| 68 // URLs that have been visited more recently are better. | 68 // URLs that have been visited more recently are better. |
| 69 return m1.url_info.last_visit() > m2.url_info.last_visit(); | 69 return m1.url_info.last_visit() > m2.url_info.last_visit(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace history | 72 } // namespace history |
| OLD | NEW |