Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Issue 2126713006: Refactor LoginDatabase migration (Closed)

Created:
4 years, 5 months ago by vabr (Chromium)
Modified:
4 years, 5 months ago
Reviewers:
dvadym
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor LoginDatabase migration The migration code had some unnecessarily complicated parts which made https://codereview.chromium.org/2127533003/ harder than needed. This CL pulls common database tasks related to table scheme migration and creation into a separate class, SQLTableBuilder. During that the code is also cleaned up and made safer by using transactions. The CL also fixes two typos in the test files. BUG=413020 Committed: https://crrev.com/8ff2f69c0743ca2b95fd9eac2d9b250e599eeedb Cr-Commit-Position: refs/heads/master@{#405116}

Patch Set 1 #

Patch Set 2 : Fix missed ssl_valid #

Patch Set 3 : Add a comment about DROP COLUMN #

Patch Set 4 : WIP: Starting to add SQL builder #

Patch Set 5 : WIP: Builder compiles but no tests and no integration #

Patch Set 6 : Sql -> SQL #

Patch Set 7 : Working again #

Patch Set 8 : Generating more strings #

Patch Set 9 : Ready for review #

Patch Set 10 : Fix typo #

Patch Set 11 : Fix some tests #

Total comments: 21

Patch Set 12 : Just rebased #

Patch Set 13 : Comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1064 lines, -389 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/password_manager.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/login_database.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +21 lines, -3 lines 0 comments Download
M components/password_manager/core/browser/login_database.cc View 1 2 3 4 5 6 7 8 9 10 11 12 17 chunks +314 lines, -384 lines 0 comments Download
A components/password_manager/core/browser/sql_table_builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +149 lines, -0 lines 0 comments Download
A components/password_manager/core/browser/sql_table_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +319 lines, -0 lines 0 comments Download
A components/password_manager/core/browser/sql_table_builder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +253 lines, -0 lines 0 comments Download
M components/test/data/password_manager/login_db_v16.sql View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/password_manager/login_db_v17.sql View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 42 (28 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2126713006/20001
4 years, 5 months ago (2016-07-06 20:27:53 UTC) #3
vabr (Chromium)
Hi Vadym, Could you please take a look? Thanks! Vaclav
4 years, 5 months ago (2016-07-06 20:55:56 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-07 00:01:15 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2126713006/40001
4 years, 5 months ago (2016-07-07 08:32:18 UTC) #9
vabr (Chromium)
Hi Vadym, I just added a single comment in patch set 3, all the rest ...
4 years, 5 months ago (2016-07-07 08:33:03 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-07 09:20:34 UTC) #12
vabr (Chromium)
Hello Vadym, Please take a look, I added the builder as you suggested yesterday. Cheers, ...
4 years, 5 months ago (2016-07-08 19:42:10 UTC) #20
dvadym
Thanks Vaclav, LGTM. Code and comments look great. I've made some comments, mostly nits. Feel ...
4 years, 5 months ago (2016-07-12 14:48:59 UTC) #30
vabr (Chromium)
Thanks, Vadym, for your kind review! I addressed most of your comments, and replied to ...
4 years, 5 months ago (2016-07-13 09:12:14 UTC) #33
dvadym
Thanks Vaclav, LGTM. https://codereview.chromium.org/2126713006/diff/200001/components/password_manager/core/browser/sql_table_builder.cc File components/password_manager/core/browser/sql_table_builder.cc (right): https://codereview.chromium.org/2126713006/diff/200001/components/password_manager/core/browser/sql_table_builder.cc#newcode143 components/password_manager/core/browser/sql_table_builder.cc:143: std::for_each(columns_.begin(), columns_.end(), On 2016/07/13 09:12:13, vabr ...
4 years, 5 months ago (2016-07-13 09:45:11 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2126713006/240001
4 years, 5 months ago (2016-07-13 10:39:26 UTC) #37
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 5 months ago (2016-07-13 10:43:37 UTC) #39
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 10:43:45 UTC) #40
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 10:45:50 UTC) #42
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/8ff2f69c0743ca2b95fd9eac2d9b250e599eeedb
Cr-Commit-Position: refs/heads/master@{#405116}

Powered by Google App Engine
This is Rietveld 408576698