Commit 8da606d7 authored by Ben Blake's avatar Ben Blake Committed by Commit Bot

Move StrikeDatabase initialization to ChromeAutofillClient.

Change-Id: Idf090e8c108c54dac39ca34e43967ad62ef432a0
Fixed: 1010212
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248640Reviewed-by: default avatarJared Saul <jsaul@google.com>
Reviewed-by: default avatarSiyu An <siyua@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Ben Blake <fiorito@google.com>
Cr-Commit-Position: refs/heads/master@{#779850}
parent ba435428
...@@ -669,6 +669,9 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) ...@@ -669,6 +669,9 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
LogManager::Create(AutofillLogRouterFactory::GetForBrowserContext( LogManager::Create(AutofillLogRouterFactory::GetForBrowserContext(
web_contents->GetBrowserContext()), web_contents->GetBrowserContext()),
base::Closure()); base::Closure());
// Initialize StrikeDatabase so its cache will be loaded and ready to use when
// when requested by other Autofill classes.
GetStrikeDatabase();
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
// Since ZoomController is also a WebContentsObserver, we need to be careful // Since ZoomController is also a WebContentsObserver, we need to be careful
......
...@@ -70,11 +70,6 @@ CreditCardAccessManager::CreditCardAccessManager( ...@@ -70,11 +70,6 @@ CreditCardAccessManager::CreditCardAccessManager(
base::WaitableEvent::InitialState::NOT_SIGNALED), base::WaitableEvent::InitialState::NOT_SIGNALED),
can_fetch_unmask_details_(base::WaitableEvent::ResetPolicy::AUTOMATIC, can_fetch_unmask_details_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::SIGNALED) { base::WaitableEvent::InitialState::SIGNALED) {
#if !defined(OS_IOS)
// This is to initialize StrikeDatabase is if it hasn't been already, so that
// its cache would be loaded and ready to use when the first CCAM is created.
client_->GetStrikeDatabase();
#endif
} }
CreditCardAccessManager::~CreditCardAccessManager() {} CreditCardAccessManager::~CreditCardAccessManager() {}
......
...@@ -86,9 +86,6 @@ CreditCardSaveManager::CreditCardSaveManager( ...@@ -86,9 +86,6 @@ CreditCardSaveManager::CreditCardSaveManager(
payments_client_(payments_client), payments_client_(payments_client),
app_locale_(app_locale), app_locale_(app_locale),
personal_data_manager_(personal_data_manager) { personal_data_manager_(personal_data_manager) {
// This is to initialize StrikeDatabase is if it hasn't been already, so that
// its cache would be loaded and ready to use when the first CCSM is created.
client_->GetStrikeDatabase();
} }
CreditCardSaveManager::~CreditCardSaveManager() {} CreditCardSaveManager::~CreditCardSaveManager() {}
......
...@@ -41,9 +41,6 @@ LocalCardMigrationManager::LocalCardMigrationManager( ...@@ -41,9 +41,6 @@ LocalCardMigrationManager::LocalCardMigrationManager(
payments_client_(payments_client), payments_client_(payments_client),
app_locale_(app_locale), app_locale_(app_locale),
personal_data_manager_(personal_data_manager) { personal_data_manager_(personal_data_manager) {
// This is to initialize StrikeDatabase is if it hasn't been already, so that
// its cache would be loaded and ready to use when the first LCMM is created.
client_->GetStrikeDatabase();
} }
LocalCardMigrationManager::~LocalCardMigrationManager() {} LocalCardMigrationManager::~LocalCardMigrationManager() {}
......
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