OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/history/in_memory_url_index.h" | 5 #include "chrome/browser/history/in_memory_url_index.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "base/i18n/word_iterator.h" | 11 #include "base/i18n/word_iterator.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/autocomplete/history_provider_util.h" | 15 #include "chrome/browser/autocomplete/history_provider_util.h" |
16 #include "chrome/browser/history/url_database.h" | 16 #include "chrome/browser/history/url_database.h" |
17 #include "net/base/escape.h" | 17 #include "net/base/escape.h" |
18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 #include "unicode/utypes.h" // for int32_t |
19 | 20 |
20 using base::Time; | 21 using base::Time; |
21 using base::TimeDelta; | 22 using base::TimeDelta; |
22 | 23 |
23 namespace history { | 24 namespace history { |
24 | 25 |
25 ScoredHistoryMatch::ScoredHistoryMatch() : raw_score(0) {} | 26 ScoredHistoryMatch::ScoredHistoryMatch() : raw_score(0) {} |
26 | 27 |
27 ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& url_info, | 28 ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& url_info, |
28 size_t input_location, | 29 size_t input_location, |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 if (scored_matches_.size() > 10) { | 523 if (scored_matches_.size() > 10) { |
523 scored_matches_.erase(scored_matches_.begin() + 10, | 524 scored_matches_.erase(scored_matches_.begin() + 10, |
524 scored_matches_.end()); | 525 scored_matches_.end()); |
525 } | 526 } |
526 } | 527 } |
527 } | 528 } |
528 } | 529 } |
529 } | 530 } |
530 | 531 |
531 } // namespace history | 532 } // namespace history |
OLD | NEW |