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

Unified Diff: chrome/browser/history/scored_history_match.cc

Issue 67553002: Omnibox Field Trial: Make HQP Score Bookmarks More Highly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/history/scored_history_match.cc
diff --git a/chrome/browser/history/scored_history_match.cc b/chrome/browser/history/scored_history_match.cc
index 3fb8e770fad1e5a65cb162eb0c158457f6d43349..406994a280b58f420cd5b767716f12629f6bfb4d 100644
--- a/chrome/browser/history/scored_history_match.cc
+++ b/chrome/browser/history/scored_history_match.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/autocomplete/url_prefix.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
+#include "chrome/browser/omnibox/omnibox_field_trial.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
@@ -26,6 +27,7 @@ namespace history {
// ScoredHistoryMatch ----------------------------------------------------------
bool ScoredHistoryMatch::initialized_ = false;
+int ScoredHistoryMatch::bookmark_value = -1;
Peter Kasting 2013/11/09 00:44:55 Maybe this should be 1.
Mark P 2013/11/25 21:11:57 Right you are. Done.
const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10u;
bool ScoredHistoryMatch::also_do_hup_like_scoring = false;
int ScoredHistoryMatch::max_assigned_score_for_non_inlineable_matches = -1;
@@ -35,6 +37,7 @@ ScoredHistoryMatch::ScoredHistoryMatch()
can_inline(false) {
if (!initialized_) {
InitializeAlsoDoHUPLikeScoringFieldAndMaxScoreField();
+ InitializeBookmarkValue();
initialized_ = true;
}
}
@@ -52,6 +55,7 @@ ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& row,
can_inline(false) {
if (!initialized_) {
InitializeAlsoDoHUPLikeScoringFieldAndMaxScoreField();
+ InitializeBookmarkValue();
initialized_ = true;
}
@@ -530,4 +534,8 @@ void ScoredHistoryMatch::InitializeAlsoDoHUPLikeScoringFieldAndMaxScoreField() {
}
}
+void ScoredHistoryMatch::InitializeBookmarkValue() {
+ bookmark_value = OmniboxFieldTrial::HQPBookmarkValue();
+}
+
} // namespace history

Powered by Google App Engine
This is Rietveld 408576698