| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_QUICK_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // TODO(mrossetti): Review to see if the following applies since we're not | 26 // TODO(mrossetti): Review to see if the following applies since we're not |
| 27 // using the database during the autocomplete pass. | 27 // using the database during the autocomplete pass. |
| 28 class HistoryQuickProvider : public HistoryProvider { | 28 class HistoryQuickProvider : public HistoryProvider { |
| 29 public: | 29 public: |
| 30 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); | 30 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); |
| 31 | 31 |
| 32 ~HistoryQuickProvider(); | 32 ~HistoryQuickProvider(); |
| 33 | 33 |
| 34 // AutocompleteProvider. |minimal_changes| is ignored since there | 34 // AutocompleteProvider. |minimal_changes| is ignored since there |
| 35 // is no asynch completion performed. | 35 // is no asynch completion performed. |
| 36 void Start(const AutocompleteInput& input, bool minimal_changes); | 36 virtual void Start(const AutocompleteInput& input, bool minimal_changes); |
| 37 | 37 |
| 38 // Performs the autocomplete matching and scoring. | 38 // Performs the autocomplete matching and scoring. |
| 39 void DoAutocomplete(); | 39 void DoAutocomplete(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 friend class HistoryQuickProviderTest; | 42 friend class HistoryQuickProviderTest; |
| 43 | 43 |
| 44 AutocompleteMatch QuickMatchToACMatch( | 44 AutocompleteMatch QuickMatchToACMatch( |
| 45 const history::ScoredHistoryMatch& history_match, | 45 const history::ScoredHistoryMatch& history_match, |
| 46 MatchType match_type, | 46 MatchType match_type, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 67 void SetIndexForTesting(history::InMemoryURLIndex* index); | 67 void SetIndexForTesting(history::InMemoryURLIndex* index); |
| 68 AutocompleteInput autocomplete_input_; | 68 AutocompleteInput autocomplete_input_; |
| 69 bool trim_http_; | 69 bool trim_http_; |
| 70 std::string languages_; | 70 std::string languages_; |
| 71 | 71 |
| 72 // Only used for testing. | 72 // Only used for testing. |
| 73 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; | 73 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 76 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |
| OLD | NEW |