Index: chrome/browser/history/chrome_scored_history_match_client.h |
diff --git a/chrome/browser/history/chrome_scored_history_match_client.h b/chrome/browser/history/chrome_scored_history_match_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4d9e53d834fdd7db9a54cd161e4879e8b9544ef1 |
--- /dev/null |
+++ b/chrome/browser/history/chrome_scored_history_match_client.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 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. |
+ |
+#ifndef CHROME_BROWSER_HISTORY_CHROME_SCORED_HISTORY_MATCH_CLIENT_H_ |
+#define CHROME_BROWSER_HISTORY_CHROME_SCORED_HISTORY_MATCH_CLIENT_H_ |
+ |
+#include "components/history/core/browser/scored_history_match_client.h" |
+ |
+namespace bookmarks { |
+class BookmarkModel; |
+} |
+ |
+class ChromeScoredHistoryMatchClient |
+ : public history::ScoredHistoryMatchClient { |
+ public: |
+ explicit ChromeScoredHistoryMatchClient( |
+ bookmarks::BookmarkModel* bookmark_model); |
+ ~ChromeScoredHistoryMatchClient() override; |
+ |
+ private: |
+ // history::ScoredHistoryMatchClient implementation. |
+ bool IsBoomarked(const GURL& url) const override; |
+ int BookmarkValue() const override; |
+ bool AllowTldMatches() const override; |
+ bool AllowSchemeMatches() const override; |
+ bool CanInlineAutocompleteMatch(const GURL& url, |
+ const base::string16& term, |
+ bool* innermost_match) const override; |
+ base::string16 CleanUpUrlAndTitleForMatching( |
+ const GURL& url, |
+ const std::string& languages, |
+ base::OffsetAdjuster::Adjustments* adjustments, |
+ base::string16* title) const override; |
+ |
+ // BookmarkModel to use for IsBookmarked() implementation; may be null during |
+ // testing. Otherwise it must outlive ChromeScoreHistoryMatchClient. |
+ bookmarks::BookmarkModel* bookmark_model_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeScoredHistoryMatchClient); |
+}; |
+ |
+#endif // CHROME_BROWSER_HISTORY_CHROME_SCORED_HISTORY_MATCH_CLIENT_H_ |