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

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

Issue 11414303: Make Google Search autocomplete provider cursor aware. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years 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.cc
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index e9495d120b851e6154515b9b695933d3455c9f91..d4df1d94fda45aaab1f28e95a383787580154026 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.cc
@@ -134,7 +134,13 @@ bool HistoryProvider::FixupUserInput(AutocompleteInput* input) {
url_parse::Parsed parts;
URLFixerUpper::SegmentURL(output, &parts);
- input->UpdateText(output, parts);
+ // TODO: This function does not take into account the cursor position while
+ // running various normalizations, including a call to FixupURL(). In order
+ // to make it work properly, we need to ensure that all logic above is
+ // cursor-aware and offsets the input cursor accordingly.
+ // For now we simply pretend that the cursor was not set at all.
+ // See http://crbug/163932 for more details.
+ input->UpdateText(output, string16::npos, parts);
return !output.empty();
}

Powered by Google App Engine
This is Rietveld 408576698