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

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

Issue 999073002: Integrate serving affiliation-based matches into the PasswordStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_integration
Patch Set: Reduce scope of CL, test utils are fixed in a separate CL. Created 5 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
Index: components/password_manager/core/browser/affiliated_match_helper.cc
diff --git a/components/password_manager/core/browser/affiliated_match_helper.cc b/components/password_manager/core/browser/affiliated_match_helper.cc
index f6b051f8d25c42f35263d43ddf3a3978e8759ade..529eda4aa9f1d4bdce90fbd2318d5b0f3bc6a7c4 100644
--- a/components/password_manager/core/browser/affiliated_match_helper.cc
+++ b/components/password_manager/core/browser/affiliated_match_helper.cc
@@ -39,15 +39,16 @@ AffiliatedMatchHelper::AffiliatedMatchHelper(
task_runner_for_waiting_(base::ThreadTaskRunnerHandle::Get()),
affiliation_service_(affiliation_service.Pass()),
weak_ptr_factory_(this) {
- DCHECK(affiliation_service_);
- DCHECK(password_store_);
}
AffiliatedMatchHelper::~AffiliatedMatchHelper() {
- password_store_->RemoveObserver(this);
+ if (password_store_)
+ password_store_->RemoveObserver(this);
}
void AffiliatedMatchHelper::Initialize() {
+ DCHECK(password_store_);
+ DCHECK(affiliation_service_);
task_runner_for_waiting_->PostDelayedTask(
FROM_HERE, base::Bind(&AffiliatedMatchHelper::DoDeferredInitialization,
weak_ptr_factory_.GetWeakPtr()),

Powered by Google App Engine
This is Rietveld 408576698