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