Index: chrome/browser/autocomplete/url_prefix.cc |
diff --git a/chrome/browser/autocomplete/url_prefix.cc b/chrome/browser/autocomplete/url_prefix.cc |
index 1d680db593014dba849110d29223211b5f76837c..8a49f2c95836b2bbd741e3adde99861e5d4bca98 100644 |
--- a/chrome/browser/autocomplete/url_prefix.cc |
+++ b/chrome/browser/autocomplete/url_prefix.cc |
@@ -77,13 +77,11 @@ bool URLPrefix::PrefixMatch(const URLPrefix& prefix, |
} |
// static |
-void URLPrefix::ComputeMatchStartAndInlineAutocompleteOffset( |
+size_t URLPrefix::GetInlineAutocompleteOffset( |
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) { |
+ const base::string16& text) { |
const URLPrefix* best_prefix = allow_www_prefix_without_scheme ? |
BestURLPrefixWithWWWCase(text, input.text()) : |
BestURLPrefix(text, input.text()); |
@@ -99,12 +97,7 @@ void URLPrefix::ComputeMatchStartAndInlineAutocompleteOffset( |
BestURLPrefix(text, fixed_up_input.text()); |
matching_string = &fixed_up_input.text(); |
} |
- if (best_prefix != NULL) { |
- *match_start = best_prefix->prefix.length(); |
- *inline_autocomplete_offset = |
- best_prefix->prefix.length() + matching_string->length(); |
- } else { |
- *match_start = base::string16::npos; |
- *inline_autocomplete_offset = base::string16::npos; |
- } |
+ return (best_prefix != NULL) ? |
+ (best_prefix->prefix.length() + matching_string->length()) : |
+ base::string16::npos; |
} |