Index: chrome/browser/autocomplete/history_provider_util.cc |
diff --git a/chrome/browser/autocomplete/history_provider_util.cc b/chrome/browser/autocomplete/history_provider_util.cc |
index 9a66306a5cd160ce27fb6506882497f18c984358..b7c8d458cbbd7bb1ae12f9f60f707571dc128c3b 100644 |
--- a/chrome/browser/autocomplete/history_provider_util.cc |
+++ b/chrome/browser/autocomplete/history_provider_util.cc |
@@ -4,6 +4,8 @@ |
#include "chrome/browser/autocomplete/history_provider_util.h" |
+#include "base/logging.h" |
+ |
namespace history { |
HistoryMatch::HistoryMatch() |
@@ -27,4 +29,11 @@ bool HistoryMatch::EqualsGURL(const HistoryMatch& h, const GURL& url) { |
return h.url_info.url() == url; |
} |
+bool HistoryMatch::IsHostOnly() const { |
+ const GURL& gurl = url_info.url(); |
+ DCHECK(gurl.is_valid()); |
+ return (!gurl.has_path() || (gurl.path() == "/")) && !gurl.has_query() && |
+ !gurl.has_ref(); |
+} |
+ |
} // namespace history |