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

Issue 2497703002: [Offline pages] Resetting offline page metadata store to handle LOAD/INIT failures (Closed)

Created:
4 years, 1 month ago by fgorski
Modified:
4 years, 1 month ago
Reviewers:
dimich, jianli
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline pages] Resetting offline page metadata store to handle LOAD/INIT failures * Adds a store reset to offline page model, in case the initial load fails with STORE_LOAD_FAILED status * Adds Initialize method to the store to handle STORE_INIT_FAILED. * Postpones OfflinePageModel actions until after initialization of the store succeeds/fails. * Adds tests to cover successful reset and unsuccessful one. * Updates tests that needed adjusting. BUG=605249 Committed: https://crrev.com/9c4ec432de012e9f6c99dfc55cd0535694a4e828 Cr-Commit-Position: refs/heads/master@{#432984}

Patch Set 1 #

Patch Set 2 : Updating StoreResetSuccessful test and OPTestStore #

Patch Set 3 : Addressing STORE_INIT_FAILED #

Total comments: 6

Patch Set 4 : Addressing comments form self-review #

Total comments: 6

Patch Set 5 : Addressing feedback from jianli@ and dimich@ #

Total comments: 14

Patch Set 6 : Addressing CR feedback from Jian #

Patch Set 7 : Rebasing #

Patch Set 8 : Fixing newly added test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -146 lines) Patch
M components/offline_pages/offline_page_metadata_store.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M components/offline_pages/offline_page_metadata_store_impl_unittest.cc View 1 2 3 4 5 6 7 22 chunks +53 lines, -25 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store_sql.h View 1 2 3 4 5 6 2 chunks +6 lines, -10 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store_sql.cc View 1 2 3 4 5 6 9 chunks +48 lines, -54 lines 0 comments Download
M components/offline_pages/offline_page_model_impl.h View 1 2 3 4 5 6 2 chunks +11 lines, -4 lines 0 comments Download
M components/offline_pages/offline_page_model_impl.cc View 1 2 3 4 5 6 6 chunks +75 lines, -31 lines 0 comments Download
M components/offline_pages/offline_page_model_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +35 lines, -8 lines 0 comments Download
M components/offline_pages/offline_page_test_store.h View 1 2 3 4 3 chunks +4 lines, -1 line 0 comments Download
M components/offline_pages/offline_page_test_store.cc View 1 2 3 4 3 chunks +29 lines, -12 lines 0 comments Download

Messages

Total messages: 53 (35 generated)
fgorski
PTAL This is part 1 (outside of our Init discussion)
4 years, 1 month ago (2016-11-11 23:23:03 UTC) #6
fgorski
self review https://codereview.chromium.org/2497703002/diff/40001/components/offline_pages/offline_page_metadata_store_sql.h File components/offline_pages/offline_page_metadata_store_sql.h (right): https://codereview.chromium.org/2497703002/diff/40001/components/offline_pages/offline_page_metadata_store_sql.h#newcode81 components/offline_pages/offline_page_metadata_store_sql.h:81: void OnResetDone(const InitializeCallback& callback, StoreState state); needs ...
4 years, 1 month ago (2016-11-14 21:59:47 UTC) #11
fgorski
Jian, This patch is now ready for your review. It covers both cases: INIT/LOAD_FAILED, and ...
4 years, 1 month ago (2016-11-14 22:24:10 UTC) #14
fgorski
I am looking at a failing test, but please review this change. Obsoletes earlier store ...
4 years, 1 month ago (2016-11-15 18:59:12 UTC) #18
jianli
https://codereview.chromium.org/2497703002/diff/60001/components/offline_pages/offline_page_metadata_store.h File components/offline_pages/offline_page_metadata_store.h (right): https://codereview.chromium.org/2497703002/diff/60001/components/offline_pages/offline_page_metadata_store.h#newcode43 components/offline_pages/offline_page_metadata_store.h:43: typedef base::Callback<void(StoreState)> InitializeCallback; nit: consider switching to use "using". ...
4 years, 1 month ago (2016-11-15 21:48:38 UTC) #19
fgorski
Updated. PTAL. https://codereview.chromium.org/2497703002/diff/60001/components/offline_pages/offline_page_metadata_store.h File components/offline_pages/offline_page_metadata_store.h (right): https://codereview.chromium.org/2497703002/diff/60001/components/offline_pages/offline_page_metadata_store.h#newcode43 components/offline_pages/offline_page_metadata_store.h:43: typedef base::Callback<void(StoreState)> InitializeCallback; On 2016/11/15 21:48:38, jianli ...
4 years, 1 month ago (2016-11-15 23:14:12 UTC) #23
jianli
https://codereview.chromium.org/2497703002/diff/80001/components/offline_pages/offline_page_metadata_store_sql.cc File components/offline_pages/offline_page_metadata_store_sql.cc (right): https://codereview.chromium.org/2497703002/diff/80001/components/offline_pages/offline_page_metadata_store_sql.cc#newcode572 components/offline_pages/offline_page_metadata_store_sql.cc:572: db_.reset(nullptr); nit: do we really need nullptr? https://codereview.chromium.org/2497703002/diff/80001/components/offline_pages/offline_page_metadata_store_sql.h File ...
4 years, 1 month ago (2016-11-16 01:34:50 UTC) #26
fgorski
Addressed. PTAL https://codereview.chromium.org/2497703002/diff/80001/components/offline_pages/offline_page_metadata_store_sql.cc File components/offline_pages/offline_page_metadata_store_sql.cc (right): https://codereview.chromium.org/2497703002/diff/80001/components/offline_pages/offline_page_metadata_store_sql.cc#newcode572 components/offline_pages/offline_page_metadata_store_sql.cc:572: db_.reset(nullptr); On 2016/11/16 01:34:50, jianli wrote: > ...
4 years, 1 month ago (2016-11-16 19:10:13 UTC) #29
jianli
lgtm
4 years, 1 month ago (2016-11-16 22:22:31 UTC) #33
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/2497703002/120001
4 years, 1 month ago (2016-11-16 23:08:05 UTC) #35
commit-bot: I haz the power
Failed to apply patch for components/offline_pages/offline_page_model_impl.h: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-16 23:40:49 UTC) #37
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/2497703002/140001
4 years, 1 month ago (2016-11-16 23:56:27 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/108308)
4 years, 1 month ago (2016-11-17 00:13:46 UTC) #42
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/2497703002/160001
4 years, 1 month ago (2016-11-17 17:58:47 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/334148)
4 years, 1 month ago (2016-11-17 19:52:37 UTC) #47
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/2497703002/160001
4 years, 1 month ago (2016-11-17 20:59:37 UTC) #49
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 1 month ago (2016-11-17 21:59:47 UTC) #51
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:04:12 UTC) #53
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9c4ec432de012e9f6c99dfc55cd0535694a4e828
Cr-Commit-Position: refs/heads/master@{#432984}

Powered by Google App Engine
This is Rietveld 408576698