| Index: components/password_manager/core/browser/login_database.cc
|
| diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
|
| index 0f75ce15a0f6e9bcb6432753ccc68f7d034cb4b0..b7950ad32840c5ce04f7e214d85ca79c43c72b09 100644
|
| --- a/components/password_manager/core/browser/login_database.cc
|
| +++ b/components/password_manager/core/browser/login_database.cc
|
| @@ -540,6 +540,7 @@ bool LoginDatabase::Init() {
|
| kCompatibleVersionNumber)) {
|
| LogDatabaseInitError(META_TABLE_INIT_ERROR);
|
| LOG(ERROR) << "Unable to create the meta table.";
|
| + transaction.Rollback();
|
| db_.Close();
|
| return false;
|
| }
|
| @@ -548,6 +549,7 @@ bool LoginDatabase::Init() {
|
| LOG(ERROR) << "Password store database is too new, kCurrentVersionNumber="
|
| << kCurrentVersionNumber << ", GetCompatibleVersionNumber="
|
| << meta_table_.GetCompatibleVersionNumber();
|
| + transaction.Rollback();
|
| db_.Close();
|
| return false;
|
| }
|
| @@ -559,6 +561,7 @@ bool LoginDatabase::Init() {
|
| if (!db_.DoesTableExist("logins")) {
|
| if (!builder.CreateTable(&db_)) {
|
| VLOG(0) << "Failed to create the 'logins' table";
|
| + transaction.Rollback();
|
| db_.Close();
|
| return false;
|
| }
|
| @@ -588,6 +591,7 @@ bool LoginDatabase::Init() {
|
| LOG(ERROR) << "Unable to migrate database from "
|
| << meta_table_.GetVersionNumber() << " to "
|
| << kCurrentVersionNumber;
|
| + transaction.Rollback();
|
| db_.Close();
|
| return false;
|
| }
|
| @@ -595,6 +599,7 @@ bool LoginDatabase::Init() {
|
| if (!stats_table_.CreateTableIfNecessary()) {
|
| LogDatabaseInitError(INIT_STATS_ERROR);
|
| LOG(ERROR) << "Unable to create the stats table.";
|
| + transaction.Rollback();
|
| db_.Close();
|
| return false;
|
| }
|
|
|