| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // callers want different behavior. Callers must set this manually. | 204 // callers want different behavior. Callers must set this manually. |
| 205 // This function should only be called on the UI thread. | 205 // This function should only be called on the UI thread. |
| 206 AutocompleteMatch SuggestExactInput(const base::string16& text, | 206 AutocompleteMatch SuggestExactInput(const base::string16& text, |
| 207 const GURL& destination_url, | 207 const GURL& destination_url, |
| 208 bool trim_http); | 208 bool trim_http); |
| 209 | 209 |
| 210 // Runs the history query on the history thread, called by the history | 210 // Runs the history query on the history thread, called by the history |
| 211 // system. The history database MAY BE NULL in which case it is not | 211 // system. The history database MAY BE NULL in which case it is not |
| 212 // available and we should return no data. Also schedules returning the | 212 // available and we should return no data. Also schedules returning the |
| 213 // results to the main thread | 213 // results to the main thread |
| 214 void ExecuteWithDB(history::HistoryBackend* backend, | 214 void ExecuteWithDB(HistoryURLProviderParams* params, |
| 215 history::URLDatabase* db, | 215 history::HistoryBackend* backend, |
| 216 HistoryURLProviderParams* params); | 216 history::URLDatabase* db); |
| 217 | 217 |
| 218 private: | 218 private: |
| 219 FRIEND_TEST_ALL_PREFIXES(HistoryURLProviderTest, HUPScoringExperiment); | 219 FRIEND_TEST_ALL_PREFIXES(HistoryURLProviderTest, HUPScoringExperiment); |
| 220 | 220 |
| 221 enum MatchType { | 221 enum MatchType { |
| 222 NORMAL, | 222 NORMAL, |
| 223 WHAT_YOU_TYPED, | 223 WHAT_YOU_TYPED, |
| 224 INLINE_AUTOCOMPLETE, | 224 INLINE_AUTOCOMPLETE, |
| 225 UNVISITED_INTRANET, // An intranet site that has never been visited. | 225 UNVISITED_INTRANET, // An intranet site that has never been visited. |
| 226 }; | 226 }; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // Used in PromoteOrCreateShorterSuggestion(). If true, we may create | 341 // Used in PromoteOrCreateShorterSuggestion(). If true, we may create |
| 342 // shorter suggestions even when they haven't been visited before: | 342 // shorter suggestions even when they haven't been visited before: |
| 343 // if the user visited http://example.com/asdf once, we'll suggest | 343 // if the user visited http://example.com/asdf once, we'll suggest |
| 344 // http://example.com/ even if they've never been to it. | 344 // http://example.com/ even if they've never been to it. |
| 345 bool create_shorter_match_; | 345 bool create_shorter_match_; |
| 346 | 346 |
| 347 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); | 347 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); |
| 348 }; | 348 }; |
| 349 | 349 |
| 350 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 350 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
| OLD | NEW |