Commit 5dc19a54 authored by Narcis Gemene's avatar Narcis Gemene Committed by Commit Bot

Revert "Rename BlacklistedDuplicatesCleaner class"

This reverts commit 95f627dc.

Reason for revert: The class will not be expanded anymore.

Original change's description:
> Rename BlacklistedDuplicatesCleaner class
> 
> This CL renames class with name BlacklistedDuplicatesCleaner to
> RedundantCredentialsCleaner. This is to reflect expanding this
> class to handle also non-blacklisted credentials, which will be
> done in coming CLs
> 
> Bug: 862930
> Change-Id: Ifba11a521775cbcd33c183aa685ae84a591d8457
> Reviewed-on: https://chromium-review.googlesource.com/1202664
> Commit-Queue: Narcis Gemene <gemene@google.com>
> Reviewed-by: Vaclav Brozek <vabr@chromium.org>
> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#588473}

TBR=vabr@chromium.org,jdoerrie@chromium.org,gemene@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 862930
Change-Id: I7edb0dfaeed734109d928694be48667228edd54d
Reviewed-on: https://chromium-review.googlesource.com/1219606Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Commit-Queue: Narcis Gemene <gemene@google.com>
Cr-Commit-Position: refs/heads/master@{#590277}
parent 1ec5add4
...@@ -37,6 +37,8 @@ jumbo_static_library("browser") { ...@@ -37,6 +37,8 @@ jumbo_static_library("browser") {
"android_affiliation/lookup_affiliation_response_parser.cc", "android_affiliation/lookup_affiliation_response_parser.cc",
"android_affiliation/lookup_affiliation_response_parser.h", "android_affiliation/lookup_affiliation_response_parser.h",
"android_affiliation/test_affiliation_fetcher_factory.h", "android_affiliation/test_affiliation_fetcher_factory.h",
"blacklisted_duplicates_cleaner.cc",
"blacklisted_duplicates_cleaner.h",
"browser_save_password_progress_logger.cc", "browser_save_password_progress_logger.cc",
"browser_save_password_progress_logger.h", "browser_save_password_progress_logger.h",
"credential_manager_impl.cc", "credential_manager_impl.cc",
...@@ -140,8 +142,6 @@ jumbo_static_library("browser") { ...@@ -140,8 +142,6 @@ jumbo_static_library("browser") {
"password_ui_utils.h", "password_ui_utils.h",
"psl_matching_helper.cc", "psl_matching_helper.cc",
"psl_matching_helper.h", "psl_matching_helper.h",
"redundant_credentials_cleaner.cc",
"redundant_credentials_cleaner.h",
"site_affiliation/asset_link_data.cc", "site_affiliation/asset_link_data.cc",
"site_affiliation/asset_link_data.h", "site_affiliation/asset_link_data.h",
"sql_table_builder.cc", "sql_table_builder.cc",
...@@ -366,6 +366,7 @@ source_set("unit_tests") { ...@@ -366,6 +366,7 @@ source_set("unit_tests") {
"android_affiliation/affiliation_service_unittest.cc", "android_affiliation/affiliation_service_unittest.cc",
"android_affiliation/affiliation_utils_unittest.cc", "android_affiliation/affiliation_utils_unittest.cc",
"android_affiliation/facet_manager_unittest.cc", "android_affiliation/facet_manager_unittest.cc",
"blacklisted_duplicates_cleaner_unittest.cc",
"browser_save_password_progress_logger_unittest.cc", "browser_save_password_progress_logger_unittest.cc",
"credential_manager_impl_unittest.cc", "credential_manager_impl_unittest.cc",
"credential_manager_logger_unittest.cc", "credential_manager_logger_unittest.cc",
...@@ -402,7 +403,6 @@ source_set("unit_tests") { ...@@ -402,7 +403,6 @@ source_set("unit_tests") {
"password_syncable_service_unittest.cc", "password_syncable_service_unittest.cc",
"password_ui_utils_unittest.cc", "password_ui_utils_unittest.cc",
"psl_matching_helper_unittest.cc", "psl_matching_helper_unittest.cc",
"redundant_credentials_cleaner_unittest.cc",
"site_affiliation/asset_link_data_unittest.cc", "site_affiliation/asset_link_data_unittest.cc",
"sql_table_builder_unittest.cc", "sql_table_builder_unittest.cc",
"statistics_table_unittest.cc", "statistics_table_unittest.cc",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/password_manager/core/browser/redundant_credentials_cleaner.h" #include "components/password_manager/core/browser/blacklisted_duplicates_cleaner.h"
#include <set> #include <set>
#include <string> #include <string>
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
namespace password_manager { namespace password_manager {
RedundantCredentialsCleaner::RedundantCredentialsCleaner( BlacklistedDuplicatesCleaner::BlacklistedDuplicatesCleaner(
scoped_refptr<PasswordStore> store, scoped_refptr<PasswordStore> store,
PrefService* prefs) PrefService* prefs)
: store_(std::move(store)), prefs_(prefs) { : store_(std::move(store)), prefs_(prefs) {
store_->GetBlacklistLogins(this); store_->GetBlacklistLogins(this);
} }
RedundantCredentialsCleaner::~RedundantCredentialsCleaner() = default; BlacklistedDuplicatesCleaner::~BlacklistedDuplicatesCleaner() = default;
void RedundantCredentialsCleaner::OnGetPasswordStoreResults( void BlacklistedDuplicatesCleaner::OnGetPasswordStoreResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results) { std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
std::set<std::string> signon_realms; std::set<std::string> signon_realms;
for (const auto& form : results) { for (const auto& form : results) {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_REDUNDANT_CREDENTIALS_CLEANER_H_ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BLACKLISTED_DUPLICATES_CLEANER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_REDUNDANT_CREDENTIALS_CLEANER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BLACKLISTED_DUPLICATES_CLEANER_H_
#include <memory> #include <memory>
#include <vector> #include <vector>
...@@ -27,11 +27,11 @@ class PasswordStore; ...@@ -27,11 +27,11 @@ class PasswordStore;
// cleared. // cleared.
// TODO(https://crbug.com/866794): Remove the code once majority of the users // TODO(https://crbug.com/866794): Remove the code once majority of the users
// executed it. // executed it.
class RedundantCredentialsCleaner : public PasswordStoreConsumer { class BlacklistedDuplicatesCleaner : public PasswordStoreConsumer {
public: public:
RedundantCredentialsCleaner(scoped_refptr<PasswordStore> store, BlacklistedDuplicatesCleaner(scoped_refptr<PasswordStore> store,
PrefService* prefs); PrefService* prefs);
~RedundantCredentialsCleaner() override; ~BlacklistedDuplicatesCleaner() override;
// PasswordStoreConsumer: // PasswordStoreConsumer:
void OnGetPasswordStoreResults( void OnGetPasswordStoreResults(
...@@ -41,9 +41,9 @@ class RedundantCredentialsCleaner : public PasswordStoreConsumer { ...@@ -41,9 +41,9 @@ class RedundantCredentialsCleaner : public PasswordStoreConsumer {
scoped_refptr<PasswordStore> store_; scoped_refptr<PasswordStore> store_;
PrefService* prefs_; PrefService* prefs_;
DISALLOW_COPY_AND_ASSIGN(RedundantCredentialsCleaner); DISALLOW_COPY_AND_ASSIGN(BlacklistedDuplicatesCleaner);
}; };
} // namespace password_manager } // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_REDUNDANT_CREDENTIALS_CLEANER_H_ #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BLACKLISTED_DUPLICATES_CLEANER_H_
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/password_manager/core/browser/redundant_credentials_cleaner.h" #include "components/password_manager/core/browser/blacklisted_duplicates_cleaner.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/test/metrics/histogram_tester.h" #include "base/test/metrics/histogram_tester.h"
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
namespace password_manager { namespace password_manager {
class RedundantCredentialsCleanerTest : public ::testing::Test { class BlacklistedDuplicatesCleanerCleanerTest : public ::testing::Test {
public: public:
RedundantCredentialsCleanerTest() = default; BlacklistedDuplicatesCleanerCleanerTest() = default;
~RedundantCredentialsCleanerTest() override = default; ~BlacklistedDuplicatesCleanerCleanerTest() override = default;
protected: protected:
TestPasswordStore* store() { return store_.get(); } TestPasswordStore* store() { return store_.get(); }
...@@ -38,10 +38,10 @@ class RedundantCredentialsCleanerTest : public ::testing::Test { ...@@ -38,10 +38,10 @@ class RedundantCredentialsCleanerTest : public ::testing::Test {
base::MakeRefCounted<TestPasswordStore>(); base::MakeRefCounted<TestPasswordStore>();
TestingPrefServiceSimple prefs_; TestingPrefServiceSimple prefs_;
DISALLOW_COPY_AND_ASSIGN(RedundantCredentialsCleanerTest); DISALLOW_COPY_AND_ASSIGN(BlacklistedDuplicatesCleanerCleanerTest);
}; };
TEST_F(RedundantCredentialsCleanerTest, RemoveBlacklistedDuplicates) { TEST_F(BlacklistedDuplicatesCleanerCleanerTest, RemoveBlacklistedDuplicates) {
base::test::ScopedTaskEnvironment scoped_task_environment; base::test::ScopedTaskEnvironment scoped_task_environment;
ASSERT_TRUE( ASSERT_TRUE(
store()->Init(syncer::SyncableService::StartSyncFlare(), nullptr)); store()->Init(syncer::SyncableService::StartSyncFlare(), nullptr));
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "components/autofill/core/browser/popup_item_ids.h" #include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_form.h"
#include "components/autofill/core/common/password_generation_util.h" #include "components/autofill/core/common/password_generation_util.h"
#include "components/password_manager/core/browser/blacklisted_duplicates_cleaner.h"
#include "components/password_manager/core/browser/hsts_query.h" #include "components/password_manager/core/browser/hsts_query.h"
#include "components/password_manager/core/browser/log_manager.h" #include "components/password_manager/core/browser/log_manager.h"
#include "components/password_manager/core/browser/password_generation_manager.h" #include "components/password_manager/core/browser/password_generation_manager.h"
...@@ -24,7 +25,6 @@ ...@@ -24,7 +25,6 @@
#include "components/password_manager/core/browser/password_manager_driver.h" #include "components/password_manager/core/browser/password_manager_driver.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/password_store_consumer.h" #include "components/password_manager/core/browser/password_store_consumer.h"
#include "components/password_manager/core/browser/redundant_credentials_cleaner.h"
#include "components/password_manager/core/common/password_manager_features.h" #include "components/password_manager/core/common/password_manager_features.h"
#include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
...@@ -39,7 +39,7 @@ void StartDeletingBlacklistedDuplicates( ...@@ -39,7 +39,7 @@ void StartDeletingBlacklistedDuplicates(
scoped_refptr<password_manager::PasswordStore> store, scoped_refptr<password_manager::PasswordStore> store,
PrefService* prefs) { PrefService* prefs) {
// The object will delete itself once the credentials are retrieved. // The object will delete itself once the credentials are retrieved.
new password_manager::RedundantCredentialsCleaner(std::move(store), prefs); new password_manager::BlacklistedDuplicatesCleaner(std::move(store), prefs);
} }
// Return true if // Return true if
......
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