| 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/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "chrome/browser/autocomplete/history_url_provider.h" | 19 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 20 #include "chrome/browser/autocomplete/url_prefix.h" | 20 #include "chrome/browser/autocomplete/url_prefix.h" |
| 21 #include "chrome/browser/bookmarks/bookmark_utils.h" | |
| 22 #include "chrome/browser/omnibox/omnibox_field_trial.h" | 21 #include "chrome/browser/omnibox/omnibox_field_trial.h" |
| 23 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 24 #include "components/bookmarks/core/browser/bookmark_service.h" | 23 #include "components/bookmarks/core/browser/bookmark_service.h" |
| 24 #include "components/bookmarks/core/browser/bookmark_utils.h" |
| 25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
| 26 | 26 |
| 27 namespace history { | 27 namespace history { |
| 28 | 28 |
| 29 // ScoredHistoryMatch ---------------------------------------------------------- | 29 // ScoredHistoryMatch ---------------------------------------------------------- |
| 30 | 30 |
| 31 // static | 31 // static |
| 32 const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10; | 32 const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10; |
| 33 const int ScoredHistoryMatch::kDaysToPrecomputeRecencyScoresFor = 366; | 33 const int ScoredHistoryMatch::kDaysToPrecomputeRecencyScoresFor = 366; |
| 34 const int ScoredHistoryMatch::kMaxRawTermScore = 30; | 34 const int ScoredHistoryMatch::kMaxRawTermScore = 30; |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 max_assigned_score_for_non_inlineable_matches_ = | 591 max_assigned_score_for_non_inlineable_matches_ = |
| 592 HistoryURLProvider::kScoreForBestInlineableResult - 1; | 592 HistoryURLProvider::kScoreForBestInlineableResult - 1; |
| 593 } | 593 } |
| 594 bookmark_value_ = OmniboxFieldTrial::HQPBookmarkValue(); | 594 bookmark_value_ = OmniboxFieldTrial::HQPBookmarkValue(); |
| 595 allow_tld_matches_ = OmniboxFieldTrial::HQPAllowMatchInTLDValue(); | 595 allow_tld_matches_ = OmniboxFieldTrial::HQPAllowMatchInTLDValue(); |
| 596 allow_scheme_matches_ = OmniboxFieldTrial::HQPAllowMatchInSchemeValue(); | 596 allow_scheme_matches_ = OmniboxFieldTrial::HQPAllowMatchInSchemeValue(); |
| 597 initialized_ = true; | 597 initialized_ = true; |
| 598 } | 598 } |
| 599 | 599 |
| 600 } // namespace history | 600 } // namespace history |
| OLD | NEW |