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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 11192008: Set grey text in the omnibox irrespective of the verbatim state. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 4c633d11a2fd5fb36178eaf43451419d3118aceb..385fe87ceafc911ef8256ff62b2ce677269359c5 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -568,7 +568,10 @@ void InstantController::SetSuggestions(
}
last_suggestion_ = suggestion;
- if (!last_verbatim_)
+ // Set the suggested text if the suggestion behavior is
+ // INSTANT_COMPLETE_NEVER irrespective of verbatim because in this case
+ // the suggested text does not get committed if the user presses enter.
+ if (suggestion.behavior == INSTANT_COMPLETE_NEVER || !last_verbatim_)
delegate_->SetSuggestedText(suggestion.text, suggestion.behavior);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698