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

Side by Side Diff: components/omnibox/browser/scored_history_match.h

Issue 2690303012: Cleaning up url_index_private_data and in_memory_url_index_types. (Closed)
Patch Set: Dropping noexcept from move operations. Created 3 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 #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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 using ScoreMaxRelevance = std::pair<double, int>; 30 using ScoreMaxRelevance = std::pair<double, int>;
31 31
32 // A sorted vector of ScoreMaxRelevance entries, used by taking a score and 32 // A sorted vector of ScoreMaxRelevance entries, used by taking a score and
33 // interpolating between consecutive buckets. See GetFinalRelevancyScore() 33 // interpolating between consecutive buckets. See GetFinalRelevancyScore()
34 // for details. 34 // for details.
35 using ScoreMaxRelevances = std::vector<ScoreMaxRelevance>; 35 using ScoreMaxRelevances = std::vector<ScoreMaxRelevance>;
36 36
37 // Required for STL, we don't use this directly. 37 // Required for STL, we don't use this directly.
38 ScoredHistoryMatch(); 38 ScoredHistoryMatch();
39 ScoredHistoryMatch(const ScoredHistoryMatch& other); 39 ScoredHistoryMatch(const ScoredHistoryMatch& other);
40 ScoredHistoryMatch(ScoredHistoryMatch&& other);
41 ScoredHistoryMatch& operator=(const ScoredHistoryMatch& other);
42 ScoredHistoryMatch& operator=(ScoredHistoryMatch&& other);
40 43
41 // Initializes the ScoredHistoryMatch with a raw score calculated for the 44 // Initializes the ScoredHistoryMatch with a raw score calculated for the
42 // history item given in |row| with recent visits as indicated in |visits|. It 45 // history item given in |row| with recent visits as indicated in |visits|. It
43 // first determines if the row qualifies by seeing if all of the terms in 46 // first determines if the row qualifies by seeing if all of the terms in
44 // |terms_vector| occur in |row|. If so, calculates a raw score. This raw 47 // |terms_vector| occur in |row|. If so, calculates a raw score. This raw
45 // score is in part determined by whether the matches occur at word 48 // score is in part determined by whether the matches occur at word
46 // boundaries, the locations of which are stored in |word_starts|. For some 49 // boundaries, the locations of which are stored in |word_starts|. For some
47 // terms, it's appropriate to look for the word boundary within the term. For 50 // terms, it's appropriate to look for the word boundary within the term. For
48 // instance, the term ".net" should look for a word boundary at the "n". 51 // instance, the term ".net" should look for a word boundary at the "n".
49 // These offsets (".net" should have an offset of 1) come from 52 // These offsets (".net" should have an offset of 1) come from
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 static ScoreMaxRelevances* relevance_buckets_override_; 206 static ScoreMaxRelevances* relevance_buckets_override_;
204 207
205 // Used for testing. If this pointer is not null, it overrides the static 208 // Used for testing. If this pointer is not null, it overrides the static
206 // local variable |default_matches_to_specificity| declared in 209 // local variable |default_matches_to_specificity| declared in
207 // GetDocumentSpecificityScore(). 210 // GetDocumentSpecificityScore().
208 static OmniboxFieldTrial::NumMatchesScores* matches_to_specificity_override_; 211 static OmniboxFieldTrial::NumMatchesScores* matches_to_specificity_override_;
209 }; 212 };
210 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; 213 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches;
211 214
212 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ 215 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_
OLDNEW
« no previous file with comments | « components/omnibox/browser/in_memory_url_index_unittest.cc ('k') | components/omnibox/browser/scored_history_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698