Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: chrome/browser/autocomplete/history_url_provider.h

Issue 372017: Fix various problems with inline autocomplete and URLs that change length dur... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698