| Index: components/browsing_data/core/counters/autofill_counter.cc
|
| diff --git a/components/browsing_data/core/counters/autofill_counter.cc b/components/browsing_data/core/counters/autofill_counter.cc
|
| index a852db41549344abd96c50f54d186ca9a06272d9..b0e55d0f7a60e7d18cdd146243487a7c163dceb1 100644
|
| --- a/components/browsing_data/core/counters/autofill_counter.cc
|
| +++ b/components/browsing_data/core/counters/autofill_counter.cc
|
| @@ -81,7 +81,20 @@ void AutofillCounter::OnWebDataServiceRequestDone(
|
| WebDataServiceBase::Handle handle,
|
| std::unique_ptr<WDTypedResult> result) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| +
|
| if (!result) {
|
| + // CancelAllRequests will cancel all queries that are active; the query that
|
| + // just failed is complete and cannot be canceled so zero it out.
|
| + if (handle == suggestions_query_) {
|
| + suggestions_query_ = 0;
|
| + } else if (handle == credit_cards_query_) {
|
| + credit_cards_query_ = 0;
|
| + } else if (handle == addresses_query_) {
|
| + addresses_query_ = 0;
|
| + } else {
|
| + NOTREACHED();
|
| + }
|
| +
|
| CancelAllRequests();
|
| return;
|
| }
|
|
|