Index: chrome/browser/autocomplete/history_url_provider.h |
=================================================================== |
--- chrome/browser/autocomplete/history_url_provider.h (revision 31214) |
+++ chrome/browser/autocomplete/history_url_provider.h (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -135,18 +135,18 @@ |
public: |
HistoryURLProvider(ACProviderListener* listener, Profile* profile) |
: AutocompleteProvider(listener, profile, "HistoryURL"), |
- history_service_(NULL), |
prefixes_(GetPrefixes()), |
params_(NULL) { |
} |
#ifdef UNIT_TEST |
HistoryURLProvider(ACProviderListener* listener, |
- HistoryService* history_service) |
- : AutocompleteProvider(listener, NULL, "History"), |
- history_service_(history_service), |
+ Profile* profile, |
+ const std::wstring& languages) |
+ : AutocompleteProvider(listener, profile, "History"), |
prefixes_(GetPrefixes()), |
- params_(NULL) { |
+ params_(NULL), |
+ languages_(languages) { |
} |
#endif |
// no destructor (see note above) |
@@ -379,10 +379,6 @@ |
MatchType match_type, |
size_t match_number); |
- // This is only non-null for testing, otherwise the HistoryService from the |
- // Profile is used. |
- HistoryService* history_service_; |
- |
// Prefixes to try appending to user input when looking for a match. |
const Prefixes prefixes_; |
@@ -391,6 +387,10 @@ |
// parameter itself is freed once it's no longer needed. The only reason we |
// keep this member is so we can set the cancel bit on it. |
HistoryURLProviderParams* params_; |
+ |
+ // Only used by unittests; if non-empty, overrides accept-languages in the |
+ // profile's pref system. |
+ std::wstring languages_; |
}; |
#endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |