Commit 01ecd03f authored by Mohamed Amir Yosef's avatar Mohamed Amir Yosef Committed by Commit Bot

[Passwords] Wire up account password store to ...

...
1- SavedPasswordsPresenter
2- CompromisedCredentialsManager

Bug: 1108422
Change-Id: I5beccb92538186d3d0958866110d64f3693386cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2385276
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803122}
parent 751422f6
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "chrome/browser/extensions/api/passwords_private/passwords_private_event_router.h" #include "chrome/browser/extensions/api/passwords_private/passwords_private_event_router.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_event_router_factory.h" #include "chrome/browser/extensions/api/passwords_private/passwords_private_event_router_factory.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_utils.h" #include "chrome/browser/extensions/api/passwords_private/passwords_private_utils.h"
#include "chrome/browser/password_manager/account_password_store_factory.h"
#include "chrome/browser/password_manager/bulk_leak_check_service_factory.h" #include "chrome/browser/password_manager/bulk_leak_check_service_factory.h"
#include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
...@@ -230,12 +231,17 @@ std::vector<CompromisedCredentialAndType> OrderCompromisedCredentials( ...@@ -230,12 +231,17 @@ std::vector<CompromisedCredentialAndType> OrderCompromisedCredentials(
PasswordCheckDelegate::PasswordCheckDelegate(Profile* profile) PasswordCheckDelegate::PasswordCheckDelegate(Profile* profile)
: profile_(profile), : profile_(profile),
password_store_(PasswordStoreFactory::GetForProfile( profile_password_store_(PasswordStoreFactory::GetForProfile(
profile, profile,
ServiceAccessType::EXPLICIT_ACCESS)), ServiceAccessType::EXPLICIT_ACCESS)),
saved_passwords_presenter_(password_store_), account_password_store_(AccountPasswordStoreFactory::GetForProfile(
profile,
ServiceAccessType::EXPLICIT_ACCESS)),
saved_passwords_presenter_(profile_password_store_,
account_password_store_),
compromised_credentials_manager_(&saved_passwords_presenter_, compromised_credentials_manager_(&saved_passwords_presenter_,
password_store_), profile_password_store_,
account_password_store_),
bulk_leak_check_service_adapter_( bulk_leak_check_service_adapter_(
&saved_passwords_presenter_, &saved_passwords_presenter_,
BulkLeakCheckServiceFactory::GetForProfile(profile_), BulkLeakCheckServiceFactory::GetForProfile(profile_),
......
...@@ -120,9 +120,10 @@ class PasswordCheckDelegate ...@@ -120,9 +120,10 @@ class PasswordCheckDelegate
// Raw pointer to the underlying profile. Needs to outlive this instance. // Raw pointer to the underlying profile. Needs to outlive this instance.
Profile* profile_ = nullptr; Profile* profile_ = nullptr;
// Handle to the password store, powering both |saved_passwords_presenter_| // Handles to the password stores, powering both |saved_passwords_presenter_|
// and |compromised_credentials_manager_|. // and |compromised_credentials_manager_|.
scoped_refptr<password_manager::PasswordStore> password_store_; scoped_refptr<password_manager::PasswordStore> profile_password_store_;
scoped_refptr<password_manager::PasswordStore> account_password_store_;
// Used by |compromised_credentials_manager_| to obtain the list of saved // Used by |compromised_credentials_manager_| to obtain the list of saved
// passwords. // passwords.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment