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

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

Issue 3177020: History provider: style cleanup (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Compile, and all that jazz Created 10 years, 4 months 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/history_url_provider.h ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_url_provider.cc
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 0f339f42483d185e8f65e5e046f3d47371b28938..b0605550afb1b684a1b4da7b12c65822cd3837bd 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -27,7 +27,6 @@
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
-// TODO(mrossetti): Move these to a more appropriate place.
using history::Prefix;
using history::Prefixes;
using history::HistoryMatch;
@@ -114,6 +113,13 @@ HistoryURLProviderParams::HistoryURLProviderParams(
languages(languages) {
}
+HistoryURLProvider::HistoryURLProvider(ACProviderListener* listener,
+ Profile* profile)
+ : AutocompleteProvider(listener, profile, "HistoryURL"),
+ prefixes_(GetPrefixes()),
+ params_(NULL) {
+}
+
void HistoryURLProvider::Start(const AutocompleteInput& input,
bool minimal_changes) {
// NOTE: We could try hard to do less work in the |minimal_changes| case
@@ -784,10 +790,8 @@ void HistoryURLProvider::CullPoorMatches(HistoryMatches* matches) const {
Time recent_threshold = history::AutocompleteAgeThreshold();
for (HistoryMatches::iterator i(matches->begin()); i != matches->end();) {
const history::URLRow& url_info(i->url_info);
- if ((url_info.typed_count() <=
- history::kLowQualityMatchTypedLimit) &&
- (url_info.visit_count() <=
- history::kLowQualityMatchVisitLimit) &&
+ if ((url_info.typed_count() <= history::kLowQualityMatchTypedLimit) &&
+ (url_info.visit_count() <= history::kLowQualityMatchVisitLimit) &&
(url_info.last_visit() < recent_threshold)) {
i = matches->erase(i);
} else {
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.h ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698