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

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

Issue 10879042: Move IsHostOnly() from HistoryURL provider to HistoryMatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra sentence in comment. Created 8 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
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..c7b42378a7114fb3d3553a6b9faee920b7f5220a 100644
--- a/chrome/browser/autocomplete/history_provider_util.cc
+++ b/chrome/browser/autocomplete/history_provider_util.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/autocomplete/history_provider_util.h"
+#include "base/logging.h"
Peter Kasting 2012/08/25 04:38:57 Nit: Alphabetical
Mark P 2012/08/26 01:23:05 I thought the associated .h file always came first
namespace history {
@@ -27,4 +28,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
« no previous file with comments | « chrome/browser/autocomplete/history_provider_util.h ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698