Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: chrome/browser/autocomplete/scored_history_match.cc

Issue 963823003: Move InMemoryURLIndex into chrome/browser/autocomplete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shortcut-database
Patch Set: Fixing win_chromium_x64_rel_ng build Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/scored_history_match.h ('k') | chrome/browser/autocomplete/scored_history_match_builder_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698