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 CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 size_t source_index, | 284 size_t source_index, |
285 const std::vector<GURL>& remove) const; | 285 const std::vector<GURL>& remove) const; |
286 | 286 |
287 // Converts a line from the database into an autocomplete match for display. | 287 // Converts a line from the database into an autocomplete match for display. |
288 AutocompleteMatch HistoryMatchToACMatch( | 288 AutocompleteMatch HistoryMatchToACMatch( |
289 const HistoryURLProviderParams& params, | 289 const HistoryURLProviderParams& params, |
290 const history::HistoryMatch& history_match, | 290 const history::HistoryMatch& history_match, |
291 MatchType match_type, | 291 MatchType match_type, |
292 int relevance); | 292 int relevance); |
293 | 293 |
294 // Returns a set of classification that highlight all the occurrences | |
Peter Kasting
2013/11/23 02:15:36
Nit: classification -> classifications
Mark P
2013/11/25 19:59:16
Done.
| |
295 // of |input_text| at word breaks in |description|. | |
296 static ACMatchClassifications ClassifyDescription( | |
297 const string16& input_text, const string16& description); | |
Peter Kasting
2013/11/23 02:15:36
Nit: One arg per line
Mark P
2013/11/25 19:59:16
Done.
| |
298 | |
294 // Params for the current query. The provider should not free this directly; | 299 // Params for the current query. The provider should not free this directly; |
295 // instead, it is passed as a parameter through the history backend, and the | 300 // instead, it is passed as a parameter through the history backend, and the |
296 // parameter itself is freed once it's no longer needed. The only reason we | 301 // parameter itself is freed once it's no longer needed. The only reason we |
297 // keep this member is so we can set the cancel bit on it. | 302 // keep this member is so we can set the cancel bit on it. |
298 HistoryURLProviderParams* params_; | 303 HistoryURLProviderParams* params_; |
299 | 304 |
300 // If true, HistoryURL provider should lookup and cull redirects. If | 305 // If true, HistoryURL provider should lookup and cull redirects. If |
301 // false, it returns matches that may be redirects to each other and | 306 // false, it returns matches that may be redirects to each other and |
302 // simply hopes the default AutoCompleteController behavior to remove | 307 // simply hopes the default AutoCompleteController behavior to remove |
303 // URLs that are likely duplicates (http://google.com <-> | 308 // URLs that are likely duplicates (http://google.com <-> |
(...skipping 11 matching lines...) Expand all Loading... | |
315 // URL-what-you-typed was visited before or not. If false, the only | 320 // URL-what-you-typed was visited before or not. If false, the only |
316 // possible result that HistoryURL provider can return is | 321 // possible result that HistoryURL provider can return is |
317 // URL-what-you-typed. This variable is not part of params_ because | 322 // URL-what-you-typed. This variable is not part of params_ because |
318 // it never changes after the HistoryURLProvider is initialized. | 323 // it never changes after the HistoryURLProvider is initialized. |
319 // It's used to aid the transition to get all URLs from history to | 324 // It's used to aid the transition to get all URLs from history to |
320 // be scored in the HistoryQuick provider only. | 325 // be scored in the HistoryQuick provider only. |
321 bool search_url_database_; | 326 bool search_url_database_; |
322 }; | 327 }; |
323 | 328 |
324 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 329 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
OLD | NEW |