Commit d1c76ab9 authored by Shubham Aggarwal's avatar Shubham Aggarwal Committed by Commit Bot

Migrate login_database to use the new sql::Database constructor

Migrate uses of the relevant set_* functions on the sql::Database object
to use the new DatabaseOptions constructor instead.

This change should have no intended behavioral effect.

Bug: 1126968
Change-Id: Id3b5163a21a8896bb80de37999a5d8a33f4c164b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533408
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826795}
parent a0cbf17d
...@@ -612,16 +612,15 @@ struct LoginDatabase::PrimaryKeyAndPassword { ...@@ -612,16 +612,15 @@ struct LoginDatabase::PrimaryKeyAndPassword {
LoginDatabase::LoginDatabase(const base::FilePath& db_path, LoginDatabase::LoginDatabase(const base::FilePath& db_path,
IsAccountStore is_account_store) IsAccountStore is_account_store)
: db_path_(db_path), is_account_store_(is_account_store) {} : db_path_(db_path),
is_account_store_(is_account_store),
// Set options for a small, private database (based on WebDatabase).
db_({.exclusive_locking = true, .page_size = 2048, .cache_size = 32}) {}
LoginDatabase::~LoginDatabase() = default; LoginDatabase::~LoginDatabase() = default;
bool LoginDatabase::Init() { bool LoginDatabase::Init() {
TRACE_EVENT0("passwords", "LoginDatabase::Init"); TRACE_EVENT0("passwords", "LoginDatabase::Init");
// Set pragmas for a small, private database (based on WebDatabase).
db_.set_page_size(2048);
db_.set_cache_size(32);
db_.set_exclusive_locking();
db_.set_histogram_tag("Passwords"); db_.set_histogram_tag("Passwords");
if (!db_.Open(db_path_)) { if (!db_.Open(db_path_)) {
......
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