summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_url_provider.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/history_url_provider.h')
-rw-r--r--chrome/browser/autocomplete/history_url_provider.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h
index 78ef780..481e1d0 100644
--- a/chrome/browser/autocomplete/history_url_provider.h
+++ b/chrome/browser/autocomplete/history_url_provider.h
@@ -6,18 +6,16 @@
#define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_
#pragma once
+#include <vector>
+
#include "chrome/browser/autocomplete/autocomplete.h"
-#include "chrome/browser/autocomplete/history_provider_util.h"
+#include "chrome/browser/history/history_types.h"
class MessageLoop;
class Profile;
namespace history {
-
-class HistoryBackend;
-class URLDatabase;
-class URLRow;
-
+ class HistoryBackend;
} // namespace history
// How history autocomplete works
@@ -133,12 +131,21 @@ struct HistoryURLProviderParams {
// anything on destruction.
class HistoryURLProvider : public AutocompleteProvider {
public:
- HistoryURLProvider(ACProviderListener* listener, Profile* profile);
+ HistoryURLProvider(ACProviderListener* listener, Profile* profile)
+ : AutocompleteProvider(listener, profile, "HistoryURL"),
+ prefixes_(GetPrefixes()),
+ params_(NULL) {
+ }
#ifdef UNIT_TEST
HistoryURLProvider(ACProviderListener* listener,
Profile* profile,
- const std::wstring& languages);
+ const std::wstring& languages)
+ : AutocompleteProvider(listener, profile, "History"),
+ prefixes_(GetPrefixes()),
+ params_(NULL),
+ languages_(languages) {
+ }
#endif
// no destructor (see note above)
@@ -294,9 +301,10 @@ class HistoryURLProvider : public AutocompleteProvider {
// input identified by |source_index|. If |source_index| or an item before
// is removed, the next item will be shifted, and this allows the caller to
// pick up on the next one when this happens.
- size_t RemoveSubsequentMatchesOf(history::HistoryMatches* matches,
- size_t source_index,
- const std::vector<GURL>& remove) const;
+ size_t RemoveSubsequentMatchesOf(
+ history::HistoryMatches* matches,
+ size_t source_index,
+ const std::vector<GURL>& remove) const;
// Converts a line from the database into an autocomplete match for display.
AutocompleteMatch HistoryMatchToACMatch(