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 "chrome/browser/history/scored_history_match.h" | 5 #include "chrome/browser/history/scored_history_match.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <iterator> | 9 #include <iterator> |
10 #include <numeric> | 10 #include <numeric> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 | 14 |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "chrome/browser/autocomplete/history_url_provider.h" | 18 #include "chrome/browser/autocomplete/history_url_provider.h" |
19 #include "chrome/browser/autocomplete/url_prefix.h" | 19 #include "chrome/browser/autocomplete/url_prefix.h" |
20 #include "chrome/browser/bookmarks/bookmark_service.h" | 20 #include "chrome/browser/bookmarks/bookmark_service.h" |
21 #include "chrome/browser/omnibox/omnibox_field_trial.h" | 21 #include "chrome/browser/omnibox/omnibox_field_trial.h" |
22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 | 24 |
25 namespace history { | 25 namespace history { |
26 | 26 |
27 // The maximum score any candidate match can achieve. | 27 // The maximum score any candidate match can achieve. |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // and not be demoted, thus outscoring the demoted HQP results. | 726 // and not be demoted, thus outscoring the demoted HQP results. |
727 // When the HQP provides these, we need to clamp the non-inlineable | 727 // When the HQP provides these, we need to clamp the non-inlineable |
728 // results to preserve this behavior. | 728 // results to preserve this behavior. |
729 if (also_do_hup_like_scoring) { | 729 if (also_do_hup_like_scoring) { |
730 max_assigned_score_for_non_inlineable_matches = | 730 max_assigned_score_for_non_inlineable_matches = |
731 HistoryURLProvider::kScoreForBestInlineableResult - 1; | 731 HistoryURLProvider::kScoreForBestInlineableResult - 1; |
732 } | 732 } |
733 } | 733 } |
734 | 734 |
735 } // namespace history | 735 } // namespace history |
OLD | NEW |