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

Unified Diff: chrome/browser/autocomplete/url_prefix.h

Issue 229733004: Omnibox: Make Bookmarks Set Inline_Autocompletion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter's comments Created 6 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
Index: chrome/browser/autocomplete/url_prefix.h
diff --git a/chrome/browser/autocomplete/url_prefix.h b/chrome/browser/autocomplete/url_prefix.h
index e3d1894f0a3890278fffc690c43f3dce825e3efd..f5494cbfe78d4983340038801619b628b4759ec0 100644
--- a/chrome/browser/autocomplete/url_prefix.h
+++ b/chrome/browser/autocomplete/url_prefix.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/strings/string16.h"
+#include "chrome/browser/autocomplete/autocomplete_input.h"
struct URLPrefix;
typedef std::vector<URLPrefix> URLPrefixes;
@@ -37,6 +38,22 @@ struct URLPrefix {
const base::string16& text,
const base::string16& prefix_suffix);
+ // Sees if |text| is inlineable against either |input| or |fixed_up_input|,
+ // filling in |match_start| and |inline_autocomplete_offset| appropriately.
+ // |allow_www_prefix_without_scheme| says whether to consider an input such
+ // as "foo" to be allowed to match against text "www.foo.com". This is
+ // needed because sometimes the string we're matching against here can come
+ // from a match's fill_into_edit, which can start with "www." without having
+ // a protocol at the beginning, and we want to allow these matches to be
+ // inlineable. ("www." is not otherwise on the default prefix list.)
+ static void ComputeMatchStartAndInlineAutocompleteOffset(
+ const AutocompleteInput& input,
+ const AutocompleteInput& fixed_up_input,
+ const bool allow_www_prefix_without_scheme,
+ const base::string16& text,
+ size_t* match_start,
+ size_t* inline_autocomplete_offset);
+
base::string16 prefix;
// The number of URL components (scheme, domain label, etc.) in the prefix.
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider_unittest.cc ('k') | chrome/browser/autocomplete/url_prefix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698