summaryrefslogtreecommitdiff
path: root/chromium/components/webdata_services
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-16 11:45:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-17 08:59:23 +0000
commit552906b0f222c5d5dd11b9fd73829d510980461a (patch)
tree3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/components/webdata_services
parent1b05827804eaf047779b597718c03e7d38344261 (diff)
downloadqtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/webdata_services')
-rw-r--r--chromium/components/webdata_services/BUILD.gn4
-rw-r--r--chromium/components/webdata_services/web_data_service_wrapper.cc70
2 files changed, 38 insertions, 36 deletions
diff --git a/chromium/components/webdata_services/BUILD.gn b/chromium/components/webdata_services/BUILD.gn
index 7c7e85b9a85..9ca146b4a48 100644
--- a/chromium/components/webdata_services/BUILD.gn
+++ b/chromium/components/webdata_services/BUILD.gn
@@ -31,9 +31,7 @@ static_library("webdata_services") {
source_set("unit_tests") {
testonly = true
- sources = [
- "web_data_service_wrapper_unittest.cc",
- ]
+ sources = [ "web_data_service_wrapper_unittest.cc" ]
deps = [
":webdata_services",
diff --git a/chromium/components/webdata_services/web_data_service_wrapper.cc b/chromium/components/webdata_services/web_data_service_wrapper.cc
index e0088bb8f0d..2e0b8527cb8 100644
--- a/chromium/components/webdata_services/web_data_service_wrapper.cc
+++ b/chromium/components/webdata_services/web_data_service_wrapper.cc
@@ -12,6 +12,7 @@
#include "base/files/file_path.h"
#include "base/single_thread_task_runner.h"
#include "base/task/post_task.h"
+#include "base/task/thread_pool.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/webdata/autocomplete_sync_bridge.h"
#include "components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h"
@@ -76,11 +77,11 @@ WebDataServiceWrapper::WebDataServiceWrapper(
// TODO(pkasting): http://crbug.com/740773 This should likely be sequenced,
// not single-threaded; it's also possible the various uses of this below
// should each use their own sequences instead of sharing this one.
- auto db_task_runner = base::CreateSingleThreadTaskRunner(
- {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE,
+ auto db_task_runner = base::ThreadPool::CreateSingleThreadTaskRunner(
+ {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::BLOCK_SHUTDOWN});
- profile_database_ =
- new WebDatabaseService(path, ui_task_runner, db_task_runner);
+ profile_database_ = base::MakeRefCounted<WebDatabaseService>(
+ path, ui_task_runner, db_task_runner);
// All tables objects that participate in managing the database must
// be added here.
@@ -95,48 +96,51 @@ WebDataServiceWrapper::WebDataServiceWrapper(
#endif
profile_database_->LoadDatabase();
- profile_autofill_web_data_ = new autofill::AutofillWebDataService(
- profile_database_, ui_task_runner, db_task_runner,
- base::Bind(show_error_callback, ERROR_LOADING_AUTOFILL));
- profile_autofill_web_data_->Init();
+ profile_autofill_web_data_ =
+ base::MakeRefCounted<autofill::AutofillWebDataService>(
+ profile_database_, ui_task_runner, db_task_runner);
+ profile_autofill_web_data_->Init(
+ base::BindOnce(show_error_callback, ERROR_LOADING_AUTOFILL));
- keyword_web_data_ = new KeywordWebDataService(
- profile_database_, ui_task_runner,
- base::Bind(show_error_callback, ERROR_LOADING_KEYWORD));
- keyword_web_data_->Init();
+ keyword_web_data_ = base::MakeRefCounted<KeywordWebDataService>(
+ profile_database_, ui_task_runner);
+ keyword_web_data_->Init(
+ base::BindOnce(show_error_callback, ERROR_LOADING_KEYWORD));
- token_web_data_ =
- new TokenWebData(profile_database_, ui_task_runner, db_task_runner,
- base::Bind(show_error_callback, ERROR_LOADING_TOKEN));
- token_web_data_->Init();
+ token_web_data_ = base::MakeRefCounted<TokenWebData>(
+ profile_database_, ui_task_runner, db_task_runner);
+ token_web_data_->Init(
+ base::BindOnce(show_error_callback, ERROR_LOADING_TOKEN));
#if !defined(OS_IOS)
- payment_manifest_web_data_ = new payments::PaymentManifestWebDataService(
- profile_database_,
- base::Bind(show_error_callback, ERROR_LOADING_PAYMENT_MANIFEST),
- ui_task_runner);
+ payment_manifest_web_data_ =
+ base::MakeRefCounted<payments::PaymentManifestWebDataService>(
+ profile_database_, ui_task_runner);
+ payment_manifest_web_data_->Init(
+ base::BindOnce(show_error_callback, ERROR_LOADING_PAYMENT_MANIFEST));
#endif
profile_autofill_web_data_->GetAutofillBackend(
- base::Bind(&InitAutofillSyncBridgesOnDBSequence, db_task_runner,
- profile_autofill_web_data_, application_locale));
- profile_autofill_web_data_->GetAutofillBackend(
- base::Bind(&InitWalletSyncBridgesOnDBSequence, db_task_runner,
- profile_autofill_web_data_, context_path, application_locale));
+ base::BindOnce(&InitAutofillSyncBridgesOnDBSequence, db_task_runner,
+ profile_autofill_web_data_, application_locale));
+ profile_autofill_web_data_->GetAutofillBackend(base::BindOnce(
+ &InitWalletSyncBridgesOnDBSequence, db_task_runner,
+ profile_autofill_web_data_, context_path, application_locale));
if (base::FeatureList::IsEnabled(
autofill::features::kAutofillEnableAccountWalletStorage)) {
- account_database_ =
- new WebDatabaseService(base::FilePath(WebDatabase::kInMemoryPath),
- ui_task_runner, db_task_runner);
+ account_database_ = base::MakeRefCounted<WebDatabaseService>(
+ base::FilePath(WebDatabase::kInMemoryPath), ui_task_runner,
+ db_task_runner);
account_database_->AddTable(std::make_unique<autofill::AutofillTable>());
account_database_->LoadDatabase();
- account_autofill_web_data_ = new autofill::AutofillWebDataService(
- account_database_, ui_task_runner, db_task_runner,
- base::Bind(show_error_callback, ERROR_LOADING_ACCOUNT_AUTOFILL));
- account_autofill_web_data_->Init();
- account_autofill_web_data_->GetAutofillBackend(base::Bind(
+ account_autofill_web_data_ =
+ base::MakeRefCounted<autofill::AutofillWebDataService>(
+ account_database_, ui_task_runner, db_task_runner);
+ account_autofill_web_data_->Init(
+ base::BindOnce(show_error_callback, ERROR_LOADING_ACCOUNT_AUTOFILL));
+ account_autofill_web_data_->GetAutofillBackend(base::BindOnce(
&InitWalletSyncBridgesOnDBSequence, db_task_runner,
account_autofill_web_data_, context_path, application_locale));
}