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 #ifndef COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/gtest_prod_util.h" |
11 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "components/history/core/browser/history_match.h" | 14 #include "components/history/core/browser/history_match.h" |
14 #include "components/history/core/browser/history_types.h" | 15 #include "components/history/core/browser/history_types.h" |
15 #include "components/omnibox/browser/in_memory_url_index_types.h" | 16 #include "components/omnibox/browser/in_memory_url_index_types.h" |
16 #include "testing/gtest/include/gtest/gtest_prod.h" | |
17 | 17 |
18 class ScoredHistoryMatchTest; | 18 class ScoredHistoryMatchTest; |
19 | 19 |
20 // An HistoryMatch that has a score as well as metrics defining where in the | 20 // An HistoryMatch that has a score as well as metrics defining where in the |
21 // history item's URL and/or page title matches have occurred. | 21 // history item's URL and/or page title matches have occurred. |
22 struct ScoredHistoryMatch : public history::HistoryMatch { | 22 struct ScoredHistoryMatch : public history::HistoryMatch { |
23 // ScoreMaxRelevance maps from an intermediate-score to the maximum | 23 // ScoreMaxRelevance maps from an intermediate-score to the maximum |
24 // final-relevance score given to a URL for this intermediate score. | 24 // final-relevance score given to a URL for this intermediate score. |
25 // This is used to store the score ranges of HQP relevance buckets. | 25 // This is used to store the score ranges of HQP relevance buckets. |
26 // Please see GetFinalRelevancyScore() for details. | 26 // Please see GetFinalRelevancyScore() for details. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 static char hqp_relevance_buckets_str_[]; | 191 static char hqp_relevance_buckets_str_[]; |
192 | 192 |
193 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) | 193 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) |
194 // to the final relevance scoring. Please see GetFinalRelevancyScore() | 194 // to the final relevance scoring. Please see GetFinalRelevancyScore() |
195 // for more details and scoring method. | 195 // for more details and scoring method. |
196 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; | 196 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; |
197 }; | 197 }; |
198 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; | 198 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; |
199 | 199 |
200 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ | 200 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ |
OLD | NEW |