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

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

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 12 matching lines...) Expand all
23 // history item's URL and/or page title matches have occurred. 23 // history item's URL and/or page title matches have occurred.
24 struct ScoredHistoryMatch : public history::HistoryMatch { 24 struct ScoredHistoryMatch : public history::HistoryMatch {
25 // ScoreMaxRelevance maps from an intermediate-score to the maximum 25 // ScoreMaxRelevance maps from an intermediate-score to the maximum
26 // final-relevance score given to a URL for this intermediate score. 26 // final-relevance score given to a URL for this intermediate score.
27 // This is used to store the score ranges of HQP relevance buckets. 27 // This is used to store the score ranges of HQP relevance buckets.
28 // Please see GetFinalRelevancyScore() for details. 28 // Please see GetFinalRelevancyScore() for details.
29 typedef std::pair<double, int> ScoreMaxRelevance; 29 typedef std::pair<double, int> ScoreMaxRelevance;
30 30
31 // Required for STL, we don't use this directly. 31 // Required for STL, we don't use this directly.
32 ScoredHistoryMatch(); 32 ScoredHistoryMatch();
33 ScoredHistoryMatch(const ScoredHistoryMatch& other);
33 34
34 // Initializes the ScoredHistoryMatch with a raw score calculated for the 35 // Initializes the ScoredHistoryMatch with a raw score calculated for the
35 // history item given in |row| with recent visits as indicated in |visits|. It 36 // history item given in |row| with recent visits as indicated in |visits|. It
36 // first determines if the row qualifies by seeing if all of the terms in 37 // first determines if the row qualifies by seeing if all of the terms in
37 // |terms_vector| occur in |row|. If so, calculates a raw score. This raw 38 // |terms_vector| occur in |row|. If so, calculates a raw score. This raw
38 // score is in part determined by whether the matches occur at word 39 // score is in part determined by whether the matches occur at word
39 // boundaries, the locations of which are stored in |word_starts|. For some 40 // boundaries, the locations of which are stored in |word_starts|. For some
40 // terms, it's appropriate to look for the word boundary within the term. For 41 // terms, it's appropriate to look for the word boundary within the term. For
41 // instance, the term ".net" should look for a word boundary at the "n". These 42 // instance, the term ".net" should look for a word boundary at the "n". These
42 // offsets (".net" should have an offset of 1) come from 43 // offsets (".net" should have an offset of 1) come from
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 static char hqp_relevance_buckets_str_[]; 193 static char hqp_relevance_buckets_str_[];
193 194
194 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) 195 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency)
195 // to the final relevance scoring. Please see GetFinalRelevancyScore() 196 // to the final relevance scoring. Please see GetFinalRelevancyScore()
196 // for more details and scoring method. 197 // for more details and scoring method.
197 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; 198 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_;
198 }; 199 };
199 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; 200 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches;
200 201
201 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ 202 #endif // COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698