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

Unified Diff: components/password_manager/core/browser/form_fetcher_impl.cc

Issue 2745173008: Ensure that FormFetcher state is WAITING when waiting for migration (Closed)
Patch Set: Fix rebase Created 3 years, 9 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/form_fetcher_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/form_fetcher_impl.cc
diff --git a/components/password_manager/core/browser/form_fetcher_impl.cc b/components/password_manager/core/browser/form_fetcher_impl.cc
index 4ba32f4188e55bd60d72df202c34f02a5f35f903..a869f2bfcb4df3ac4ee16b6181171d7cad09b10c 100644
--- a/components/password_manager/core/browser/form_fetcher_impl.cc
+++ b/components/password_manager/core/browser/form_fetcher_impl.cc
@@ -91,10 +91,10 @@ const std::vector<const PasswordForm*>& FormFetcherImpl::GetFederatedMatches()
void FormFetcherImpl::OnGetPasswordStoreResults(
std::vector<std::unique_ptr<PasswordForm>> results) {
DCHECK_EQ(State::WAITING, state_);
- state_ = State::NOT_WAITING;
if (need_to_refetch_) {
// The received results are no longer up to date, need to re-request.
+ state_ = State::NOT_WAITING;
Fetch();
need_to_refetch_ = false;
return;
@@ -167,6 +167,8 @@ void FormFetcherImpl::Fetch() {
void FormFetcherImpl::ProcessPasswordStoreResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
+ DCHECK_EQ(State::WAITING, state_);
+ state_ = State::NOT_WAITING;
federated_ = SplitFederatedMatches(&results);
non_federated_ = std::move(results);
« no previous file with comments | « no previous file | components/password_manager/core/browser/form_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698