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

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

Issue 171753002: Omnibox: SearchProvider: Fix Navsuggestions in Prevent-Inlining Mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wrapping Created 6 years, 10 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 | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/base_search_provider.cc
diff --git a/chrome/browser/autocomplete/base_search_provider.cc b/chrome/browser/autocomplete/base_search_provider.cc
index 348ced6bd95c274b7681d9fa9d3dd68d14a3bd50..b39ad521d3f99a69322cd7cf659a7dd801aee329 100644
--- a/chrome/browser/autocomplete/base_search_provider.cc
+++ b/chrome/browser/autocomplete/base_search_provider.cc
@@ -209,8 +209,8 @@ void BaseSearchProvider::NavigationResult::CalculateAndClassifyMatchContents(
// scheme.
const URLPrefix* prefix =
URLPrefix::BestURLPrefix(formatted_url_, input_text);
- size_t match_start = (prefix == NULL) ? formatted_url_.find(input_text)
- : prefix->prefix.length();
+ size_t match_start = (prefix == NULL) ?
+ formatted_url_.find(input_text) : prefix->prefix.length();
bool trim_http = !AutocompleteInput::HasHTTPScheme(input_text) &&
(!prefix || (match_start != 0));
const net::FormatUrlTypes format_types =
@@ -235,7 +235,8 @@ void BaseSearchProvider::NavigationResult::CalculateAndClassifyMatchContents(
bool BaseSearchProvider::NavigationResult::IsInlineable(
const base::string16& input) const {
- return URLPrefix::BestURLPrefix(formatted_url_, input) != NULL;
+ return
+ URLPrefix::BestURLPrefix(base::UTF8ToUTF16(url_.spec()), input) != NULL;
}
int BaseSearchProvider::NavigationResult::CalculateRelevance(
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698