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

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

Issue 5657002: Re-load instant results when user text has whitespace changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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
« 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_loader.cc
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index af76f344d9d19f7a26ea496c1ceaaf4d9900c07b..40954d3220d6e6f3567b6f0adea16b79f1da3fbf 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -480,8 +480,12 @@ void InstantLoader::Update(TabContentsWrapper* tab_contents,
// modifies the text of the omnibox in anyway the URL changes. We also need to
// update if verbatim changes and we're showing instant results. We have to be
// careful in checking user_text as in some situations InstantController
- // passes in an empty string (when it knows the user_text won't matter).
- if (url_ == url && (!template_url || verbatim == verbatim_)) {
+ // passes in an empty string (when it knows the user_text won't matter). In
+ // these cases, we don't worry about whether the new user text matches the old
+ // user text.
+ if ((url_ == url) &&
+ (new_user_text.empty() || user_text_ == new_user_text) &&
+ (!template_url || verbatim == verbatim_)) {
suggested_text->assign(last_suggestion_);
return;
}
« 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