| Index: chrome/browser/ui/find_bar/find_tab_helper.cc
|
| diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
|
| index 4f089762b2bd65707484cf40bdfe44f32019080d..f9da77669a7024d545e30ef31a7de5c31903c7c7 100644
|
| --- a/chrome/browser/ui/find_bar/find_tab_helper.cc
|
| +++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
|
| @@ -35,8 +35,8 @@ FindTabHelper::FindTabHelper(WebContents* web_contents)
|
| current_find_request_id_(find_request_id_counter_++),
|
| current_find_session_id_(current_find_request_id_),
|
| last_search_case_sensitive_(false),
|
| - last_search_result_() {
|
| -}
|
| + last_search_result_(),
|
| + final_update_received_for_current_query_(false) {}
|
|
|
| FindTabHelper::~FindTabHelper() {
|
| }
|
| @@ -88,6 +88,7 @@ void FindTabHelper::StartFinding(base::string16 search_string,
|
| last_search_case_sensitive_ = case_sensitive;
|
|
|
| find_op_aborted_ = false;
|
| + final_update_received_for_current_query_ = false;
|
|
|
| // Keep track of what the last search was across the tabs.
|
| Profile* profile =
|
| @@ -174,6 +175,15 @@ void FindTabHelper::HandleFindReply(int request_id,
|
| else if (selection_rect.IsEmpty())
|
| selection = last_search_result_.selection_rect();
|
|
|
| + // Don't report more than one "final update" for a given query. See
|
| + // https://crbug.com/682299.
|
| + if (final_update) {
|
| + if (final_update_received_for_current_query_)
|
| + final_update = false;
|
| + else
|
| + final_update_received_for_current_query_ = true;
|
| + }
|
| +
|
| // Notify the UI, automation and any other observers that a find result was
|
| // found.
|
| last_search_result_ = FindNotificationDetails(
|
|
|