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

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

Issue 2846023003: Creating a preference for storing a sync password hash. (Closed)
Patch Set: Reviewer's comments addressed Created 3 years, 8 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/password_store.cc
diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
index 2aad1c122529e9cd3e1e86eba797f96e07a3faad..a9d543a44e7ae65f303922783137bcfece7372fe 100644
--- a/components/password_manager/core/browser/password_store.cc
+++ b/components/password_manager/core/browser/password_store.cc
@@ -111,8 +111,10 @@ PasswordStore::PasswordStore(
is_propagating_password_changes_to_web_credentials_enabled_(false),
shutdown_called_(false) {}
-bool PasswordStore::Init(const syncer::SyncableService::StartSyncFlare& flare) {
- ScheduleTask(base::Bind(&PasswordStore::InitOnBackgroundThread, this, flare));
+bool PasswordStore::Init(const syncer::SyncableService::StartSyncFlare& flare,
+ PrefService* prefs) {
+ ScheduleTask(
+ base::Bind(&PasswordStore::InitOnBackgroundThread, this, flare, prefs));
return true;
}
@@ -718,14 +720,15 @@ void PasswordStore::ScheduleUpdateAffiliatedWebLoginsImpl(
}
void PasswordStore::InitOnBackgroundThread(
- const syncer::SyncableService::StartSyncFlare& flare) {
+ const syncer::SyncableService::StartSyncFlare& flare,
+ PrefService* prefs) {
DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
DCHECK(!syncable_service_);
syncable_service_.reset(new PasswordSyncableService(this));
syncable_service_->InjectStartSyncFlare(flare);
// TODO(crbug.com/706392): Fix password reuse detection for Android.
#if !defined(OS_ANDROID) && !defined(OS_IOS)
- reuse_detector_.reset(new PasswordReuseDetector);
+ reuse_detector_ = base::MakeUnique<PasswordReuseDetector>(prefs);
GetAutofillableLoginsImpl(
base::MakeUnique<GetLoginsRequest>(reuse_detector_.get()));
#endif

Powered by Google App Engine
This is Rietveld 408576698