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

Issue 2225333003: Recreate the WebData database on a catastrophic SQL error (Closed)

Created:
4 years, 4 months ago by afakhry
Modified:
3 years, 9 months ago
CC:
chromium-reviews, rouslan+autofill_chromium.org, estade+watch_chromium.org, vabr+watchlistautofill_chromium.org, jdonnelly+autofillwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Recreate the WebData database on a catastrophic SQL error Currently, if the WebData database gets corrupted, it will remain like so and users will keep getting the profile error dialog every time they sign in. The only way for the user to fix this is to recreate the profile or delete the corrupt file. This CL does for the WebData DB as is done for the History DB; when a catastrophic error is seen, the DB is razed. Example feedback report filed with this CL applied: https://docs.google.com/a/google.com/document/d/1qt-AwWVHZTtcJoFPNq2_yI-Tl2pIiOwEQCaIf23iL4g/edit?usp=sharing BUG=455749, 635734 Committed: https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e Cr-Commit-Position: refs/heads/master@{#413500}

Patch Set 1 #

Total comments: 4

Patch Set 2 : derat's comments #

Total comments: 7

Patch Set 3 : shess@' comments #

Total comments: 1

Patch Set 4 : Recover DB and show profile error dialog #

Total comments: 10

Patch Set 5 : shess' comments #

Total comments: 5

Patch Set 6 : Rebase on shess change in https://codereview.chromium.org/2258703004/ #

Patch Set 7 : Move to c/b/profiles #

Patch Set 8 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -58 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/history/chrome_history_client.cc View 1 2 3 4 5 6 2 chunks +2 lines, -6 lines 0 comments Download
A chrome/browser/profiles/sql_init_error_message_ids.h View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/profiles/sql_init_error_message_ids.cc View 1 2 3 4 5 6 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/web_data_service_factory.cc View 1 2 3 4 5 6 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M components/webdata/common/web_database_backend.h View 1 2 3 2 chunks +5 lines, -6 lines 0 comments Download
M components/webdata/common/web_database_backend.cc View 1 2 3 4 2 chunks +35 lines, -26 lines 0 comments Download
M components/webdata/common/web_database_service.h View 1 chunk +2 lines, -2 lines 0 comments Download
M components/webdata/common/web_database_service.cc View 1 2 3 1 chunk +21 lines, -12 lines 0 comments Download
M sql/init_status.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 60 (36 generated)
Daniel Erat
(drive-by review; i'm unfamiliar with this code.) it'd be nice to have tests for the ...
4 years, 4 months ago (2016-08-09 21:05:42 UTC) #6
afakhry
derat@ Thanks! I'll try to add tests once I finalize the solution. Adding shess@. shess@, ...
4 years, 4 months ago (2016-08-09 21:36:18 UTC) #8
Scott Hess - ex-Googler
Note that the doc linked in the CL comment takes me to a doc containing ...
4 years, 4 months ago (2016-08-10 17:16:19 UTC) #10
afakhry
shess@ With the solution in this new patch, we RazeAndClose() the DB on a catastrophic ...
4 years, 4 months ago (2016-08-11 17:32:54 UTC) #16
afakhry
On 2016/08/11 17:32:54, afakhry wrote: > shess@ > With the solution in this new patch, ...
4 years, 4 months ago (2016-08-11 18:03:51 UTC) #17
afakhry
shess@, friendly ping. Thank you!
4 years, 4 months ago (2016-08-12 18:52:08 UTC) #20
Scott Hess - ex-Googler
OK, I'm not _entirely_ sure I follow at this point. I spent the balance of ...
4 years, 4 months ago (2016-08-12 21:05:33 UTC) #21
Scott Hess - ex-Googler
I'm liking this better, but I need to go over OpenInternal() because I'm concerned that ...
4 years, 4 months ago (2016-08-12 21:11:53 UTC) #22
afakhry
Hello shess@, Did you manage to write tests to see where the block I added ...
4 years, 4 months ago (2016-08-17 23:30:38 UTC) #27
Scott Hess - ex-Googler
LGTM with suggested changes. Sorry for the delay. https://codereview.chromium.org/2225333003/diff/120001/components/webdata/common/web_database_backend.cc File components/webdata/common/web_database_backend.cc (right): https://codereview.chromium.org/2225333003/diff/120001/components/webdata/common/web_database_backend.cc#newcode108 components/webdata/common/web_database_backend.cc:108: diagnostics_.clear(); ...
4 years, 4 months ago (2016-08-18 21:51:38 UTC) #36
Scott Hess - ex-Googler
BTW, crbug.com/597785 is about an attempt to have a helper function which automagically does best-effort ...
4 years, 4 months ago (2016-08-18 21:54:31 UTC) #37
afakhry
Thanks shess@ +thestig@ for chrome/. https://codereview.chromium.org/2225333003/diff/120001/components/webdata/common/web_database_backend.cc File components/webdata/common/web_database_backend.cc (right): https://codereview.chromium.org/2225333003/diff/120001/components/webdata/common/web_database_backend.cc#newcode108 components/webdata/common/web_database_backend.cc:108: diagnostics_.clear(); On 2016/08/18 21:51:38, ...
4 years, 4 months ago (2016-08-19 18:01:58 UTC) #39
Lei Zhang
https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h File chrome/browser/sql_init_error_message_ids.h (right): https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h#newcode1 chrome/browser/sql_init_error_message_ids.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-08-19 18:15:03 UTC) #40
afakhry
https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h File chrome/browser/sql_init_error_message_ids.h (right): https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h#newcode1 chrome/browser/sql_init_error_message_ids.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-08-19 20:07:50 UTC) #42
afakhry
I rebased on shess' change in https://codereview.chromium.org/2258703004/ and tested that the behavior is exactly the ...
4 years, 4 months ago (2016-08-20 00:54:11 UTC) #45
Lei Zhang
https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h File chrome/browser/sql_init_error_message_ids.h (right): https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h#newcode1 chrome/browser/sql_init_error_message_ids.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-08-20 01:17:52 UTC) #46
afakhry
https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h File chrome/browser/sql_init_error_message_ids.h (right): https://codereview.chromium.org/2225333003/diff/140001/chrome/browser/sql_init_error_message_ids.h#newcode1 chrome/browser/sql_init_error_message_ids.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-08-20 02:00:02 UTC) #47
Lei Zhang
On 2016/08/20 02:00:02, afakhry wrote: > Done. Tnanks. Want to see if c/b/profiles/OWNERS will take ...
4 years, 4 months ago (2016-08-20 02:08:29 UTC) #48
afakhry
Fixed typo. +erg@chromium.org: To approve the addition of sql_init_error_message_ids.[cc/h] in c/b/profiles.
4 years, 4 months ago (2016-08-20 02:32:12 UTC) #51
Elliot Glaysher
lgtm
4 years, 4 months ago (2016-08-22 17:30:19 UTC) #52
Lei Zhang
lgtm
4 years, 4 months ago (2016-08-22 17:38:12 UTC) #53
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/2225333003/200001
4 years, 4 months ago (2016-08-22 17:51:37 UTC) #56
commit-bot: I haz the power
Committed patchset #8 (id:200001)
4 years, 4 months ago (2016-08-22 19:07:18 UTC) #58
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 19:09:54 UTC) #60
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e
Cr-Commit-Position: refs/heads/master@{#413500}

Powered by Google App Engine
This is Rietveld 408576698