OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 10 matching lines...) Expand all Loading... |
21 } // namespace history | 21 } // namespace history |
22 | 22 |
23 // This class is an autocomplete provider (a pseudo-internal component of | 23 // This class is an autocomplete provider (a pseudo-internal component of |
24 // the history system) which quickly (and synchronously) provides matching | 24 // the history system) which quickly (and synchronously) provides matching |
25 // results from recently or frequently visited sites in the profile's | 25 // results from recently or frequently visited sites in the profile's |
26 // history. | 26 // history. |
27 class HistoryQuickProvider : public HistoryProvider { | 27 class HistoryQuickProvider : public HistoryProvider { |
28 public: | 28 public: |
29 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); | 29 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); |
30 | 30 |
31 ~HistoryQuickProvider(); | 31 virtual ~HistoryQuickProvider(); |
32 | 32 |
33 // AutocompleteProvider. |minimal_changes| is ignored since there | 33 // AutocompleteProvider. |minimal_changes| is ignored since there |
34 // is no asynch completion performed. | 34 // is no asynch completion performed. |
35 virtual void Start(const AutocompleteInput& input, | 35 virtual void Start(const AutocompleteInput& input, |
36 bool minimal_changes) OVERRIDE; | 36 bool minimal_changes) OVERRIDE; |
37 | 37 |
38 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; | 38 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; |
39 | 39 |
40 // Performs the autocomplete matching and scoring. | 40 // Performs the autocomplete matching and scoring. |
41 void DoAutocomplete(); | 41 void DoAutocomplete(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Only for use in unittests. Takes ownership of |index|. | 74 // Only for use in unittests. Takes ownership of |index|. |
75 void SetIndexForTesting(history::InMemoryURLIndex* index); | 75 void SetIndexForTesting(history::InMemoryURLIndex* index); |
76 AutocompleteInput autocomplete_input_; | 76 AutocompleteInput autocomplete_input_; |
77 std::string languages_; | 77 std::string languages_; |
78 | 78 |
79 // Only used for testing. | 79 // Only used for testing. |
80 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; | 80 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; |
81 }; | 81 }; |
82 | 82 |
83 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 83 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |
OLD | NEW |