Commit 632e04e0 authored by Viktor Semeniuk's avatar Viktor Semeniuk Committed by Commit Bot

[Password Check] Mocked BulkLeakCheckService for tests

This change adds BulkLeakCheckServiceInterface and
TestBulkLeakCheckService which can be used by unit tests.

Bug: 1087314
Change-Id: Ia7d80efe1b09a107c8cf1241f2b7fbd1a6a3de19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218174
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774583}
parent a15be274
......@@ -39,7 +39,7 @@ class PasswordCheckProgress;
class PasswordCheckDelegate
: public password_manager::SavedPasswordsPresenter::Observer,
public password_manager::CompromisedCredentialsManager::Observer,
public password_manager::BulkLeakCheckService::Observer {
public password_manager::BulkLeakCheckServiceInterface::Observer {
public:
using StartPasswordCheckCallback =
PasswordsPrivateDelegate::StartPasswordCheckCallback;
......@@ -163,8 +163,8 @@ class PasswordCheckDelegate
observed_compromised_credentials_manager_{this};
// A scoped observer for the BulkLeakCheckService.
ScopedObserver<password_manager::BulkLeakCheckService,
password_manager::BulkLeakCheckService::Observer>
ScopedObserver<password_manager::BulkLeakCheckServiceInterface,
password_manager::BulkLeakCheckServiceInterface::Observer>
observed_bulk_leak_check_service_{this};
// An id generator for compromised credentials. Required to match
......
......@@ -27,9 +27,9 @@ BulkLeakCheckServiceFactory* BulkLeakCheckServiceFactory::GetInstance() {
}
// static
password_manager::BulkLeakCheckService*
password_manager::BulkLeakCheckServiceInterface*
BulkLeakCheckServiceFactory::GetForProfile(Profile* profile) {
return static_cast<password_manager::BulkLeakCheckService*>(
return static_cast<password_manager::BulkLeakCheckServiceInterface*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
......
......@@ -8,7 +8,7 @@
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace password_manager {
class BulkLeakCheckService;
class BulkLeakCheckServiceInterface;
}
class Profile;
......@@ -20,7 +20,7 @@ class BulkLeakCheckServiceFactory : public BrowserContextKeyedServiceFactory {
~BulkLeakCheckServiceFactory() override;
static BulkLeakCheckServiceFactory* GetInstance();
static password_manager::BulkLeakCheckService* GetForProfile(
static password_manager::BulkLeakCheckServiceInterface* GetForProfile(
Profile* profile);
private:
......
......@@ -30,7 +30,7 @@
// software.
class SafetyCheckHandler
: public settings::SettingsPageUIHandler,
public password_manager::BulkLeakCheckService::Observer,
public password_manager::BulkLeakCheckServiceInterface::Observer,
public safety_check::SafetyCheck::SafetyCheckHandlerInterface {
public:
// The following enum represent the state of the safety check parent
......@@ -237,12 +237,12 @@ class SafetyCheckHandler
std::unique_ptr<safety_check::UpdateCheckHelper> update_helper_;
std::unique_ptr<VersionUpdater> version_updater_;
password_manager::BulkLeakCheckService* leak_service_ = nullptr;
password_manager::BulkLeakCheckServiceInterface* leak_service_ = nullptr;
extensions::PasswordsPrivateDelegate* passwords_delegate_ = nullptr;
extensions::ExtensionPrefs* extension_prefs_ = nullptr;
extensions::ExtensionServiceInterface* extension_service_ = nullptr;
ScopedObserver<password_manager::BulkLeakCheckService,
password_manager::BulkLeakCheckService::Observer>
ScopedObserver<password_manager::BulkLeakCheckServiceInterface,
password_manager::BulkLeakCheckServiceInterface::Observer>
observed_leak_check_{this};
base::WeakPtrFactory<SafetyCheckHandler> weak_ptr_factory_{this};
};
......
......@@ -58,6 +58,8 @@ jumbo_static_library("browser") {
"browser_save_password_progress_logger.h",
"bulk_leak_check_service.cc",
"bulk_leak_check_service.h",
"bulk_leak_check_service_interface.cc",
"bulk_leak_check_service_interface.h",
"compromised_credentials_consumer.cc",
"compromised_credentials_consumer.h",
"compromised_credentials_observer.cc",
......@@ -427,6 +429,8 @@ jumbo_static_library("test_support") {
"android_affiliation/mock_affiliation_consumer.h",
"fake_form_fetcher.cc",
"fake_form_fetcher.h",
"mock_bulk_leak_check_service.cc",
"mock_bulk_leak_check_service.h",
"mock_password_feature_manager.cc",
"mock_password_feature_manager.h",
"mock_password_form_manager_for_ui.cc",
......@@ -451,11 +455,13 @@ jumbo_static_library("test_support") {
":browser",
":hash_password_manager",
"//components/autofill/core/browser:test_support",
"//components/keyed_service/core",
"//components/password_manager/core/browser/leak_detection",
"//components/safe_browsing:buildflags",
"//components/ukm",
"//services/network/public/cpp",
"//testing/gmock",
"//url:url",
"//url",
]
deps = [
":affiliation",
......
......@@ -134,6 +134,18 @@ size_t BulkLeakCheckService::GetPendingChecksCount() const {
return bulk_leak_check_ ? bulk_leak_check_->GetPendingChecksCount() : 0;
}
BulkLeakCheckService::State BulkLeakCheckService::GetState() const {
return state_;
}
void BulkLeakCheckService::AddObserver(Observer* obs) {
observers_.AddObserver(obs);
}
void BulkLeakCheckService::RemoveObserver(Observer* obs) {
observers_.RemoveObserver(obs);
}
void BulkLeakCheckService::Shutdown() {
observers_.Clear();
metrics_reporter_.reset();
......
......@@ -11,7 +11,7 @@
#include "base/memory/scoped_refptr.h"
#include "base/observer_list.h"
#include "base/observer_list_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/password_manager/core/browser/bulk_leak_check_service_interface.h"
#include "components/password_manager/core/browser/leak_detection/bulk_leak_check.h"
#include "components/password_manager/core/browser/leak_detection/leak_detection_check_factory.h"
#include "components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h"
......@@ -26,68 +26,32 @@ class IdentityManager;
namespace password_manager {
class BulkLeakCheck;
// The service that allows to check arbitrary number of passwords against the
// database of leaked credentials.
class BulkLeakCheckService : public KeyedService,
public BulkLeakCheckDelegateInterface {
class BulkLeakCheckService : public BulkLeakCheckDelegateInterface,
public BulkLeakCheckServiceInterface {
public:
enum class State {
// The service is idle and there was no previous error.
kIdle,
// The service is checking some credentials.
kRunning,
// Those below are error states. On any error the current job is aborted.
// The error is sticky until next CheckUsernamePasswordPairs() call.
// Cancel() aborted the running check.
kCanceled,
// The user isn't signed-in to Chrome.
kSignedOut,
// Error obtaining an access token.
kTokenRequestFailure,
// Error in hashing/encrypting for the request.
kHashingFailure,
// Error related to network.
kNetworkError,
// Error related to the password leak Google service.
kServiceError,
// Error related to the quota limit of the password leak Google service.
kQuotaLimit,
};
class Observer : public base::CheckedObserver {
public:
// BulkLeakCheckService changed its state.
virtual void OnStateChanged(State state) = 0;
// Called when |credential| is analyzed.
virtual void OnCredentialDone(const LeakCheckCredential& credential,
IsLeaked is_leaked) = 0;
};
BulkLeakCheckService(
signin::IdentityManager* identity_manager,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);
~BulkLeakCheckService() override;
// Starts the checks or appends |credentials| to the existing queue.
void CheckUsernamePasswordPairs(std::vector<LeakCheckCredential> credentials);
void CheckUsernamePasswordPairs(
std::vector<LeakCheckCredential> credentials) override;
// Stops all the current checks immediately.
void Cancel();
void Cancel() override;
// Returns number of pending passwords to be checked.
size_t GetPendingChecksCount() const;
size_t GetPendingChecksCount() const override;
// Returns the current state of the service.
State state() const { return state_; }
State GetState() const override;
void AddObserver(Observer* obs) { observers_.AddObserver(obs); }
void AddObserver(Observer* obs) override;
void RemoveObserver(Observer* obs) { observers_.RemoveObserver(obs); }
void RemoveObserver(Observer* obs) override;
// KeyedService:
void Shutdown() override;
......@@ -124,6 +88,7 @@ class BulkLeakCheckService : public KeyedService,
std::unique_ptr<MetricsReporter> metrics_reporter_;
State state_ = State::kIdle;
base::ObserverList<Observer> observers_;
};
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/password_manager/core/browser/bulk_leak_check_service_interface.h"
namespace password_manager {
BulkLeakCheckServiceInterface::BulkLeakCheckServiceInterface() = default;
BulkLeakCheckServiceInterface::~BulkLeakCheckServiceInterface() = default;
} // namespace password_manager
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BULK_LEAK_CHECK_SERVICE_INTERFACE_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BULK_LEAK_CHECK_SERVICE_INTERFACE_H_
#include <memory>
#include <vector>
#include "base/observer_list_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/password_manager/core/browser/leak_detection/bulk_leak_check.h"
#include "components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h"
namespace password_manager {
// The interface for a service that allows to check arbitrary number of
// passwords against the database of leaked credentials.
class BulkLeakCheckServiceInterface : public KeyedService {
public:
enum class State {
// The service is idle and there was no previous error.
kIdle,
// The service is checking some credentials.
kRunning,
// Those below are error states. On any error the current job is aborted.
// The error is sticky until next CheckUsernamePasswordPairs() call.
// Cancel() aborted the running check.
kCanceled,
// The user isn't signed-in to Chrome.
kSignedOut,
// Error obtaining an access token.
kTokenRequestFailure,
// Error in hashing/encrypting for the request.
kHashingFailure,
// Error related to network.
kNetworkError,
// Error related to the password leak Google service.
kServiceError,
// Error related to the quota limit of the password leak Google service.
kQuotaLimit,
};
class Observer : public base::CheckedObserver {
public:
// BulkLeakCheckService changed its state.
virtual void OnStateChanged(State state) = 0;
// Called when |credential| is analyzed.
virtual void OnCredentialDone(const LeakCheckCredential& credential,
IsLeaked is_leaked) = 0;
};
BulkLeakCheckServiceInterface();
~BulkLeakCheckServiceInterface() override;
// Not copyable or movable
BulkLeakCheckServiceInterface(const BulkLeakCheckServiceInterface&) = delete;
BulkLeakCheckServiceInterface& operator=(
const BulkLeakCheckServiceInterface&) = delete;
BulkLeakCheckServiceInterface(BulkLeakCheckServiceInterface&&) = delete;
BulkLeakCheckServiceInterface& operator=(BulkLeakCheckServiceInterface&&) =
delete;
// Starts the checks or appends |credentials| to the existing queue.
virtual void CheckUsernamePasswordPairs(
std::vector<LeakCheckCredential> credentials) = 0;
// Stops all the current checks immediately.
virtual void Cancel() = 0;
// Returns number of pending passwords to be checked.
virtual size_t GetPendingChecksCount() const = 0;
// Returns the current state of the service.
virtual State GetState() const = 0;
virtual void AddObserver(Observer* obs) = 0;
virtual void RemoveObserver(Observer* obs) = 0;
};
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BULK_LEAK_CHECK_SERVICE_INTERFACE_H_
......@@ -124,12 +124,12 @@ void BulkLeakCheckServiceTest::ConductLeakCheck(
EXPECT_CALL(*weak_leak_check, GetPendingChecksCount)
.WillRepeatedly(Return(0));
delegate->OnFinishedCredential(TestCredential(), is_leaked);
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
}
TEST_F(BulkLeakCheckServiceTest, OnCreation) {
EXPECT_EQ(0u, service().GetPendingChecksCount());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_THAT(
histogram_tester().GetTotalCountsForPrefix("PasswordManager.BulkCheck"),
......@@ -141,7 +141,7 @@ TEST_F(BulkLeakCheckServiceTest, StartWithZeroPasswords) {
service().AddObserver(&observer);
service().CheckUsernamePasswordPairs({});
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
EXPECT_THAT(
histogram_tester().GetTotalCountsForPrefix("PasswordManager.BulkCheck"),
......@@ -162,7 +162,7 @@ TEST_F(BulkLeakCheckServiceTest, Running) {
EXPECT_CALL(observer, OnStateChanged(BulkLeakCheckService::State::kRunning));
service().CheckUsernamePasswordPairs(TestCredentials());
EXPECT_EQ(BulkLeakCheckService::State::kRunning, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kRunning, service().GetState());
EXPECT_CALL(*weak_leak_check, GetPendingChecksCount)
.WillRepeatedly(Return(10));
EXPECT_EQ(10u, service().GetPendingChecksCount());
......@@ -189,7 +189,7 @@ TEST_F(BulkLeakCheckServiceTest, AppendRunning) {
EXPECT_CALL(observer, OnStateChanged(BulkLeakCheckService::State::kRunning));
service().CheckUsernamePasswordPairs(TestCredentials());
EXPECT_EQ(BulkLeakCheckService::State::kRunning, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kRunning, service().GetState());
EXPECT_CALL(*weak_leak_check, GetPendingChecksCount)
.WillRepeatedly(Return(20));
EXPECT_EQ(20u, service().GetPendingChecksCount());
......@@ -203,7 +203,7 @@ TEST_F(BulkLeakCheckServiceTest, FailedToCreateCheck) {
.WillOnce(Return(ByMove(nullptr)));
service().CheckUsernamePasswordPairs(TestCredentials());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
EXPECT_THAT(
histogram_tester().GetTotalCountsForPrefix("PasswordManager.BulkCheck"),
......@@ -223,7 +223,7 @@ TEST_F(BulkLeakCheckServiceTest, FailedToCreateCheckWithError) {
OnStateChanged(BulkLeakCheckService::State::kSignedOut));
service().CheckUsernamePasswordPairs(TestCredentials());
EXPECT_EQ(BulkLeakCheckService::State::kSignedOut, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kSignedOut, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
base::HistogramTester::CountsMap expected_counts;
expected_counts["PasswordManager.BulkCheck.Error"] = 1;
......@@ -240,7 +240,7 @@ TEST_F(BulkLeakCheckServiceTest, CancelNothing) {
service().Cancel();
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
EXPECT_THAT(
histogram_tester().GetTotalCountsForPrefix("PasswordManager.BulkCheck"),
......@@ -259,7 +259,7 @@ TEST_F(BulkLeakCheckServiceTest, CancelSomething) {
EXPECT_CALL(observer, OnStateChanged(BulkLeakCheckService::State::kCanceled));
service().Cancel();
EXPECT_EQ(BulkLeakCheckService::State::kCanceled, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kCanceled, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
histogram_tester().ExpectUniqueSample(
"PasswordManager.BulkCheck.CanceledCredentials", 2, 1);
......@@ -315,7 +315,7 @@ TEST_F(BulkLeakCheckServiceTest, CheckFinished) {
IsLeaked(false)));
delegate->OnFinishedCredential(TestCredential(), IsLeaked(false));
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
histogram_tester().ExpectUniqueSample(
"PasswordManager.BulkCheck.CheckedCredentials", 2, 1);
......@@ -351,7 +351,7 @@ TEST_F(BulkLeakCheckServiceTest, CheckFinishedWithLeakedCredential) {
}
delegate->OnFinishedCredential(TestCredential(), IsLeaked(true));
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kIdle, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
histogram_tester().ExpectUniqueSample(
"PasswordManager.BulkCheck.CheckedCredentials", 2, 1);
......@@ -407,7 +407,7 @@ TEST_F(BulkLeakCheckServiceTest, CheckFinishedWithError) {
OnStateChanged(BulkLeakCheckService::State::kServiceError));
delegate->OnError(LeakDetectionError::kInvalidServerResponse);
EXPECT_EQ(BulkLeakCheckService::State::kServiceError, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kServiceError, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
base::HistogramTester::CountsMap expected_counts;
expected_counts["PasswordManager.BulkCheck.Error"] = 1;
......@@ -434,7 +434,7 @@ TEST_F(BulkLeakCheckServiceTest, CheckFinishedWithQuotaLimit) {
OnStateChanged(BulkLeakCheckService::State::kQuotaLimit));
delegate->OnError(LeakDetectionError::kQuotaLimit);
EXPECT_EQ(BulkLeakCheckService::State::kQuotaLimit, service().state());
EXPECT_EQ(BulkLeakCheckService::State::kQuotaLimit, service().GetState());
EXPECT_EQ(0u, service().GetPendingChecksCount());
base::HistogramTester::CountsMap expected_counts;
expected_counts["PasswordManager.BulkCheck.Error"] = 1;
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/password_manager/core/browser/mock_bulk_leak_check_service.h"
#include "base/timer/elapsed_timer.h"
namespace password_manager {
MockBulkLeakCheckService::MockBulkLeakCheckService() = default;
MockBulkLeakCheckService::~MockBulkLeakCheckService() = default;
} // namespace password_manager
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_MOCK_BULK_LEAK_CHECK_SERVICE_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_MOCK_BULK_LEAK_CHECK_SERVICE_H_
#include <memory>
#include <vector>
#include "base/memory/scoped_refptr.h"
#include "base/observer_list.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/password_manager/core/browser/bulk_leak_check_service_interface.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace password_manager {
// Mocked BulkLeakCheckService used by unit tests.
class MockBulkLeakCheckService : public BulkLeakCheckServiceInterface {
public:
MockBulkLeakCheckService();
~MockBulkLeakCheckService() override;
MOCK_METHOD(void,
CheckUsernamePasswordPairs,
(std::vector<LeakCheckCredential>),
(override));
MOCK_METHOD(void, Cancel, (), (override));
MOCK_METHOD(size_t, GetPendingChecksCount, (), (const, override));
MOCK_METHOD(State, GetState, (), (const, override));
MOCK_METHOD(void, AddObserver, (Observer*), (override));
MOCK_METHOD(void, RemoveObserver, (Observer*), (override));
MOCK_METHOD(void, Shutdown, (), (override));
};
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_MOCK_BULK_LEAK_CHECK_SERVICE_H_
......@@ -21,7 +21,7 @@ namespace password_manager {
BulkLeakCheckServiceAdapter::BulkLeakCheckServiceAdapter(
SavedPasswordsPresenter* presenter,
BulkLeakCheckService* service,
BulkLeakCheckServiceInterface* service,
PrefService* prefs)
: presenter_(presenter), service_(service), prefs_(prefs) {
DCHECK(presenter_);
......@@ -37,7 +37,7 @@ BulkLeakCheckServiceAdapter::~BulkLeakCheckServiceAdapter() {
bool BulkLeakCheckServiceAdapter::StartBulkLeakCheck(
const void* key,
LeakCheckCredential::Data* data) {
if (service_->state() == BulkLeakCheckService::State::kRunning)
if (service_->GetState() == BulkLeakCheckServiceInterface::State::kRunning)
return false;
// Even though the BulkLeakCheckService performs canonicalization eventually
......@@ -69,9 +69,9 @@ void BulkLeakCheckServiceAdapter::StopBulkLeakCheck() {
service_->Cancel();
}
BulkLeakCheckService::State BulkLeakCheckServiceAdapter::GetBulkLeakCheckState()
const {
return service_->state();
BulkLeakCheckServiceInterface::State
BulkLeakCheckServiceAdapter::GetBulkLeakCheckState() const {
return service_->GetState();
}
size_t BulkLeakCheckServiceAdapter::GetPendingChecksCount() const {
......
......@@ -5,7 +5,7 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_UI_BULK_LEAK_CHECK_SERVICE_ADAPTER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_UI_BULK_LEAK_CHECK_SERVICE_ADAPTER_H_
#include "components/password_manager/core/browser/bulk_leak_check_service.h"
#include "components/password_manager/core/browser/bulk_leak_check_service_interface.h"
#include "components/password_manager/core/browser/leak_detection/bulk_leak_check.h"
#include "components/password_manager/core/browser/ui/saved_passwords_presenter.h"
......@@ -22,7 +22,7 @@ namespace password_manager {
class BulkLeakCheckServiceAdapter : public SavedPasswordsPresenter::Observer {
public:
BulkLeakCheckServiceAdapter(SavedPasswordsPresenter* presenter,
BulkLeakCheckService* service,
BulkLeakCheckServiceInterface* service,
PrefService* prefs);
~BulkLeakCheckServiceAdapter() override;
......@@ -39,7 +39,7 @@ class BulkLeakCheckServiceAdapter : public SavedPasswordsPresenter::Observer {
void StopBulkLeakCheck();
// Obtains the state of the bulk leak check.
BulkLeakCheckService::State GetBulkLeakCheckState() const;
BulkLeakCheckServiceInterface::State GetBulkLeakCheckState() const;
// Gets the list of pending checks.
size_t GetPendingChecksCount() const;
......@@ -51,7 +51,7 @@ class BulkLeakCheckServiceAdapter : public SavedPasswordsPresenter::Observer {
// Weak handles to a presenter and service, respectively. These must be not
// null and must outlive the adapter.
SavedPasswordsPresenter* presenter_ = nullptr;
BulkLeakCheckService* service_ = nullptr;
BulkLeakCheckServiceInterface* service_ = nullptr;
PrefService* prefs_ = nullptr;
};
......
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