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

Unified Diff: chrome/browser/find_bar_controller.cc

Issue 338005: Find-in-page should not ding while deleting characters. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/find_bar_controller.cc
===================================================================
--- chrome/browser/find_bar_controller.cc (revision 30046)
+++ chrome/browser/find_bar_controller.cc (working copy)
@@ -121,7 +121,10 @@
UpdateFindBarForCurrentResult();
if (tab_contents_->find_result().final_update() &&
tab_contents_->find_result().number_of_matches() == 0) {
- find_bar_->AudibleAlert();
+ const string16& last_search = tab_contents_->previous_find_text();
+ const string16& current_search = tab_contents_->find_text();
+ if (last_search.find(current_search) != 0)
Peter Kasting 2009/10/26 21:04:33 Nit: If you want, you can inline those temps into
+ find_bar_->AudibleAlert();
}
}
} else if (type == NotificationType::NAV_ENTRY_COMMITTED) {
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.h » ('j') | chrome/browser/tab_contents/tab_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698