Skip to content

Commit

Permalink
Reset the cached QuickAnswers result.
Browse files Browse the repository at this point in the history
Quick Answer result is cached when getting it from the server. The
result type is then used for logging purpose.

Currently, the result doesn't get reset when user select a new text. If
users perform actions before the result came back from the server, the
cached result type is used for logging.

This CL reset the result when user select a new text and trigger
QuickAnswers.

Bug: b/160244136
Test: Manual test
Change-Id: I526684755b7876aa0b6df12513ead9284a5454c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276513
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Li Lin <llin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784116}
  • Loading branch information
Li Lin authored and Commit Bot committed Jun 30, 2020
1 parent c1217a1 commit 8305a1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ash/quick_answers/quick_answers_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ void QuickAnswersControllerImpl::MaybeShowQuickAnswers(
title_ = title;
query_ = title;
context_ = context;
quick_answer_.reset();

QuickAnswersRequest request = BuildRequest();
if (chromeos::features::IsQuickAnswersTextAnnotatorEnabled()) {
Expand Down

0 comments on commit 8305a1e

Please sign in to comment.