| 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 |
| 11 #include "chrome/browser/autocomplete/autocomplete_match.h" | 11 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 12 #include "chrome/browser/autocomplete/history_provider.h" | 12 #include "chrome/browser/autocomplete/history_provider.h" |
| 13 #include "chrome/browser/history/history_types.h" | 13 #include "chrome/browser/history/history_types.h" |
| 14 #include "chrome/browser/history/in_memory_url_index.h" | 14 #include "chrome/browser/history/in_memory_url_index.h" |
| 15 | 15 |
| 16 class Profile; | 16 class Profile; |
| 17 class TermMatches; | 17 class TermMatches; |
| 18 | 18 |
| 19 namespace history { | |
| 20 class HistoryBackend; | |
| 21 } // namespace history | |
| 22 | |
| 23 // This class is an autocomplete provider (a pseudo-internal component of | 19 // This class is an autocomplete provider (a pseudo-internal component of |
| 24 // the history system) which quickly (and synchronously) provides matching | 20 // the history system) which quickly (and synchronously) provides matching |
| 25 // results from recently or frequently visited sites in the profile's | 21 // results from recently or frequently visited sites in the profile's |
| 26 // history. | 22 // history. |
| 27 class HistoryQuickProvider : public HistoryProvider { | 23 class HistoryQuickProvider : public HistoryProvider { |
| 28 public: | 24 public: |
| 29 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); | 25 HistoryQuickProvider(ACProviderListener* listener, Profile* profile); |
| 30 | 26 |
| 31 virtual ~HistoryQuickProvider(); | 27 virtual ~HistoryQuickProvider(); |
| 32 | 28 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 std::string languages_; | 85 std::string languages_; |
| 90 | 86 |
| 91 // Only used for testing. | 87 // Only used for testing. |
| 92 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; | 88 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; |
| 93 | 89 |
| 94 // This provider is disabled when true. | 90 // This provider is disabled when true. |
| 95 static bool disabled_; | 91 static bool disabled_; |
| 96 }; | 92 }; |
| 97 | 93 |
| 98 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 94 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |
| OLD | NEW |