| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "ui/base/range/range.h" | 12 #include "ui/base/range/range.h" |
| 13 | 13 |
| 14 namespace app_list { | 14 namespace app_list { |
| 15 | 15 |
| 16 class TokenizedString; | 16 class TokenizedString; |
| 17 | 17 |
| 18 // TokenizedStringMatch takes two tokenized strings: one as the text and | 18 // TokenizedStringMatch takes two tokenized strings: one as the text and |
| 19 // the other one as the query. It matches the query against the text, | 19 // the other one as the query. It matches the query against the text, |
| 20 // calculates a relevance score between [0, 1] and marks the matched portions | 20 // calculates a relevance score between [0, 1] and marks the matched portions |
| 21 // of text. A relevance of zero means the two are completely different to each | 21 // of text. A relevance of zero means the two are completely different to each |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 private: | 41 private: |
| 42 double relevance_; | 42 double relevance_; |
| 43 Hits hits_; | 43 Hits hits_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(TokenizedStringMatch); | 45 DISALLOW_COPY_AND_ASSIGN(TokenizedStringMatch); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace app_list | 48 } // namespace app_list |
| 49 | 49 |
| 50 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ | 50 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_MATCH_H_ |
| OLD | NEW |