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

Unified Diff: components/omnibox/browser/url_prefix.h

Issue 1897403002: Optimize URLPrefix::BestURLPrefix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes after review, round 2 Created 4 years, 8 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 | « components/omnibox/browser/BUILD.gn ('k') | components/omnibox/browser/url_prefix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/url_prefix.h
diff --git a/components/omnibox/browser/url_prefix.h b/components/omnibox/browser/url_prefix.h
index 96fd1ef951a94a2ba72307d9d09a25ed8d530bcf..b92936bf2beacb5ae75cba0e2ae0ccbb4e140d8e 100644
--- a/components/omnibox/browser/url_prefix.h
+++ b/components/omnibox/browser/url_prefix.h
@@ -22,9 +22,6 @@ struct URLPrefix {
// Returns a vector of URL prefixes sorted by descending number of components.
static const URLPrefixes& GetURLPrefixes();
- // Returns if the argument is a valid URL prefix.
- static bool IsURLPrefix(const base::string16& prefix);
-
// Returns the URL prefix of |text| with the most components, or NULL.
// |prefix_suffix| (which may be empty) is appended to every attempted prefix,
// which is useful for finding the innermost match of user input in a URL.
@@ -32,13 +29,6 @@ struct URLPrefix {
static const URLPrefix* BestURLPrefix(const base::string16& text,
const base::string16& prefix_suffix);
- // A helper function for BestURLPrefix(). Returns true if |text| starts
- // with |prefix| which is then followed by |prefix_suffix|.
- // Performs case insensitive string comparison.
- static bool PrefixMatch(const URLPrefix& prefix,
- const base::string16& text,
- const base::string16& prefix_suffix);
-
// Sees if |text| is inlineable against either |input| or |fixed_up_input|,
// returning the appropriate inline autocomplete offset or
// base::string16::npos if |text| is not inlineable.
« no previous file with comments | « components/omnibox/browser/BUILD.gn ('k') | components/omnibox/browser/url_prefix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698