Commit 68c5b68c authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Clear account-storage-related prefs if the feature is disabled

Bug: 1079297
Change-Id: I071760c7bae8a6648b1c6d7f6047702af56f7002
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316199
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791774}
parent fd592b98
...@@ -81,6 +81,10 @@ PasswordModelTypeController::PasswordModelTypeController( ...@@ -81,6 +81,10 @@ PasswordModelTypeController::PasswordModelTypeController(
FROM_HERE, base::BindOnce(&PasswordModelTypeController::MaybeClearStore, FROM_HERE, base::BindOnce(&PasswordModelTypeController::MaybeClearStore,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
account_password_store_for_cleanup)); account_password_store_for_cleanup));
} else {
// If the feature flag is disabled, clear any related prefs that might still
// be around.
features_util::ClearAccountStorageSettingsForAllUsers(pref_service_);
} }
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "components/invalidation/impl/fake_invalidation_service.h" #include "components/invalidation/impl/fake_invalidation_service.h"
#include "components/password_manager/core/browser/test_password_store.h" #include "components/password_manager/core/browser/test_password_store.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/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h" #include "components/prefs/testing_pref_service.h"
#include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/signin/public/identity_manager/identity_test_environment.h"
...@@ -58,6 +59,8 @@ class WebViewSyncClientTest : public PlatformTest { ...@@ -58,6 +59,8 @@ class WebViewSyncClientTest : public PlatformTest {
&invalidation_service_) { &invalidation_service_) {
pref_service_.registry()->RegisterBooleanPref( pref_service_.registry()->RegisterBooleanPref(
prefs::kSavingBrowserHistoryDisabled, true); prefs::kSavingBrowserHistoryDisabled, true);
pref_service_.registry()->RegisterDictionaryPref(
password_manager::prefs::kAccountStoragePerAccountSettings);
profile_password_store_->Init(&pref_service_, base::DoNothing()); profile_password_store_->Init(&pref_service_, base::DoNothing());
if (account_password_store_) { if (account_password_store_) {
account_password_store_->Init(&pref_service_, base::DoNothing()); account_password_store_->Init(&pref_service_, base::DoNothing());
......
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