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

Unified Diff: chrome/browser/ui/omnibox/omnibox_controller.cc

Issue 19197005: Omnibox: Change |inline_autocomplete_offset| to |inline_autocompletion| (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop user_text() in omnibox_edit_model Created 7 years, 5 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 | « chrome/browser/resources/omnibox/omnibox.js ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_controller.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_controller.cc b/chrome/browser/ui/omnibox/omnibox_controller.cc
index 196fef79714899f3f0c227fff25c393f56b5d3b1..b5b7117f8f9e76d1f92bed39cbf325efdd80e8d2 100644
--- a/chrome/browser/ui/omnibox/omnibox_controller.cc
+++ b/chrome/browser/ui/omnibox/omnibox_controller.cc
@@ -69,21 +69,6 @@ void OmniboxController::OnResultChanged(bool default_match_changed) {
const AutocompleteResult::const_iterator match(result.default_match());
if (match != result.end()) {
current_match_ = *match;
- // TODO(beaudoin): This code could be made simpler if AutocompleteMatch
- // had an |inline_autocompletion| instead of |inline_autocomplete_offset|.
- // The |fill_into_edit| we get may not match what we have in the view at
- // that time. We're only interested in the inline_autocomplete part, so
- // update this here.
- current_match_.fill_into_edit = omnibox_edit_model_->user_text();
- if (match->inline_autocomplete_offset < match->fill_into_edit.length()) {
- current_match_.inline_autocomplete_offset =
- current_match_.fill_into_edit.length();
- current_match_.fill_into_edit += match->fill_into_edit.substr(
- match->inline_autocomplete_offset);
- } else {
- current_match_.inline_autocomplete_offset = string16::npos;
- }
-
if (!prerender::IsOmniboxEnabled(profile_))
DoPreconnect(*match);
omnibox_edit_model_->OnCurrentMatchChanged();
« no previous file with comments | « chrome/browser/resources/omnibox/omnibox.js ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698