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

Issue 2343743002: [Offline pages] Updating the UpdateCallback in OPMStoreSQL (Closed)

Created:
4 years, 3 months ago by fgorski
Modified:
4 years, 3 months ago
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] Updating the UpdateCallback in OPMStoreSQL * Introduces an StoreUdpateResult object to carry the result of update in unique ptr. * Propagates the changes to consumers of the store. * Adds/Updates tests. BUG=645522 Committed: https://crrev.com/7c81890adbfc05d426e76e2850e6b07022c58b6b Cr-Commit-Position: refs/heads/master@{#419926}

Patch Set 1 #

Total comments: 20

Patch Set 2 : Modifying the UpdateCallback, adding StoreUdpateResult #

Total comments: 7

Patch Set 3 : Addressing feedback #

Total comments: 5

Patch Set 4 : Applying offline_page_item operator== in test code #

Patch Set 5 : Addressing feedback from Doug and rebasing #

Total comments: 6

Patch Set 6 : Addressing final feedback #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -195 lines) Patch
M components/offline_pages/offline_page_item.h View 1 2 1 chunk +2 lines, -0 lines 1 comment Download
M components/offline_pages/offline_page_item.cc View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store.h View 1 2 3 4 5 2 chunks +37 lines, -20 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store_impl_unittest.cc View 1 2 3 4 5 18 chunks +47 lines, -49 lines 0 comments Download
M components/offline_pages/offline_page_metadata_store_sql.cc View 1 2 3 4 5 12 chunks +123 lines, -53 lines 1 comment Download
M components/offline_pages/offline_page_model_impl.h View 1 4 chunks +6 lines, -9 lines 1 comment Download
M components/offline_pages/offline_page_model_impl.cc View 1 2 3 4 8 chunks +52 lines, -49 lines 0 comments Download
M components/offline_pages/offline_page_test_store.cc View 1 2 3 4 5 4 chunks +43 lines, -15 lines 1 comment Download

Messages

Total messages: 50 (25 generated)
fgorski
PTAL. This is a bit from being done, but captures the essence of how I ...
4 years, 3 months ago (2016-09-15 03:28:54 UTC) #4
Dmitry Titov
There is somethign cumbersome in returning 2 collections that are subtly different but mostly the ...
4 years, 3 months ago (2016-09-15 17:22:41 UTC) #7
Dmitry Titov
There is somethign cumbersome in returning 2 collections that are subtly different but mostly the ...
4 years, 3 months ago (2016-09-15 17:22:44 UTC) #8
fgorski
On 2016/09/15 17:22:44, Dmitry Titov wrote: > There is somethign cumbersome in returning 2 collections ...
4 years, 3 months ago (2016-09-15 17:47:47 UTC) #9
Pete Williamson
https://codereview.chromium.org/2343743002/diff/1/components/offline_pages/offline_page_metadata_store_impl_unittest.cc File components/offline_pages/offline_page_metadata_store_impl_unittest.cc (right): https://codereview.chromium.org/2343743002/diff/1/components/offline_pages/offline_page_metadata_store_impl_unittest.cc#newcode297 components/offline_pages/offline_page_metadata_store_impl_unittest.cc:297: last_status_ = updated_items.size() > 0 ? STATUS_TRUE : STATUS_FALSE; ...
4 years, 3 months ago (2016-09-15 18:05:43 UTC) #10
dougarnett
https://codereview.chromium.org/2343743002/diff/1/components/offline_pages/offline_page_metadata_store.h File components/offline_pages/offline_page_metadata_store.h (right): https://codereview.chromium.org/2343743002/diff/1/components/offline_pages/offline_page_metadata_store.h#newcode61 components/offline_pages/offline_page_metadata_store.h:61: typedef base::Callback<void(const std::map<int64_t, ItemActionStatus>&, nit - seems like successful ...
4 years, 3 months ago (2016-09-15 19:57:24 UTC) #11
fgorski
I didn't get the chance to apply all the feedback, but was able to redo ...
4 years, 3 months ago (2016-09-16 23:55:00 UTC) #14
dougarnett
https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h File components/offline_pages/offline_page_metadata_store.h (right): https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h#newcode46 components/offline_pages/offline_page_metadata_store.h:46: std::vector<std::pair<int64_t, ItemActionStatus>> item_statuses; I still don't see the usefulness ...
4 years, 3 months ago (2016-09-19 16:37:29 UTC) #17
Pete Williamson
On 2016/09/19 16:37:29, dougarnett wrote: > https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h > File components/offline_pages/offline_page_metadata_store.h (right): > > https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h#newcode46 > ...
4 years, 3 months ago (2016-09-19 17:50:58 UTC) #18
fgorski
PTAL. 2 action items for tomorrow: * Merge with a patch that fixes a crash ...
4 years, 3 months ago (2016-09-19 23:24:30 UTC) #21
Pete Williamson
looks good so far, I'll look at tommorow's changes before stamping it.
4 years, 3 months ago (2016-09-20 00:13:02 UTC) #22
dougarnett
https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h File components/offline_pages/offline_page_metadata_store.h (right): https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h#newcode46 components/offline_pages/offline_page_metadata_store.h:46: std::vector<std::pair<int64_t, ItemActionStatus>> item_statuses; On 2016/09/19 23:24:30, fgorski wrote: > ...
4 years, 3 months ago (2016-09-20 01:39:40 UTC) #25
fgorski
On 2016/09/20 01:39:40, dougarnett wrote: > https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h > File components/offline_pages/offline_page_metadata_store.h (right): > > https://codereview.chromium.org/2343743002/diff/20001/components/offline_pages/offline_page_metadata_store.h#newcode46 > ...
4 years, 3 months ago (2016-09-20 04:04:20 UTC) #26
dougarnett
On 2016/09/20 04:04:20, fgorski wrote: ... > > Perhaps my alternative wasn't clear, I was ...
4 years, 3 months ago (2016-09-20 04:28:46 UTC) #27
dougarnett
https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc File components/offline_pages/offline_page_model_impl.cc (right): https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc#newcode957 components/offline_pages/offline_page_model_impl.cc:957: // This pat of the loop is explicitly broken ...
4 years, 3 months ago (2016-09-20 16:12:44 UTC) #28
fgorski
Addressed, rebased and applied reminder of changes. PTAL https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc File components/offline_pages/offline_page_model_impl.cc (right): https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc#newcode957 components/offline_pages/offline_page_model_impl.cc:957: // ...
4 years, 3 months ago (2016-09-20 18:43:55 UTC) #31
Pete Williamson
lgtm On Tue, Sep 20, 2016 at 11:43 AM, <fgorski@chromium.org> wrote: > Addressed, rebased and ...
4 years, 3 months ago (2016-09-20 20:15:10 UTC) #34
dougarnett
lgtm https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc File components/offline_pages/offline_page_model_impl.cc (right): https://codereview.chromium.org/2343743002/diff/40001/components/offline_pages/offline_page_model_impl.cc#newcode976 components/offline_pages/offline_page_model_impl.cc:976: delete_result = DeletePageResult::SUCCESS; On 2016/09/20 18:43:55, fgorski wrote: ...
4 years, 3 months ago (2016-09-20 20:22:10 UTC) #35
Dmitry Titov
lgtm with nits: https://codereview.chromium.org/2343743002/diff/80001/components/offline_pages/offline_page_item.cc File components/offline_pages/offline_page_item.cc (right): https://codereview.chromium.org/2343743002/diff/80001/components/offline_pages/offline_page_item.cc#newcode65 components/offline_pages/offline_page_item.cc:65: return url == other.url && offline_id ...
4 years, 3 months ago (2016-09-20 20:43:38 UTC) #36
fgorski
Addressed. Going for a dry run now. https://codereview.chromium.org/2343743002/diff/80001/components/offline_pages/offline_page_item.cc File components/offline_pages/offline_page_item.cc (right): https://codereview.chromium.org/2343743002/diff/80001/components/offline_pages/offline_page_item.cc#newcode65 components/offline_pages/offline_page_item.cc:65: return url ...
4 years, 3 months ago (2016-09-20 22:15:02 UTC) #39
Pete Williamson
lgtm
4 years, 3 months ago (2016-09-20 23:01:22 UTC) #40
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/2343743002/100001
4 years, 3 months ago (2016-09-20 23:13:44 UTC) #44
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-09-21 00:54:41 UTC) #47
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/7c81890adbfc05d426e76e2850e6b07022c58b6b Cr-Commit-Position: refs/heads/master@{#419926}
4 years, 3 months ago (2016-09-21 00:58:19 UTC) #49
dewittj
4 years, 3 months ago (2016-09-23 17:21:36 UTC) #50
Message was sent while issue was closed.
lgtm with a few nits

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
File components/offline_pages/offline_page_item.h (right):

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
components/offline_pages/offline_page_item.h:57: bool operator==(const
OfflinePageItem& other) const;
This should be documented; in particular, two OfflinePageItems could refer to
the same file and be !=, if one had its access_count or other fields modified
and the other didn't.

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
File components/offline_pages/offline_page_metadata_store_sql.cc (right):

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
components/offline_pages/offline_page_metadata_store_sql.cc:286: "SELECT * FROM
" OFFLINE_PAGES_TABLE_NAME " WHERE offline_id = ?";
is 'SELECT *' discouraged in Chromium?  It has been for me in other jobs

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
File components/offline_pages/offline_page_model_impl.h (right):

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
components/offline_pages/offline_page_model_impl.h:198: void
OnMarkPageAccesseDone(const OfflinePageItem& offline_page_item,
nit: spelling

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
File components/offline_pages/offline_page_test_store.cc (right):

https://codereview.chromium.org/2343743002/diff/100001/components/offline_pag...
components/offline_pages/offline_page_test_store.cc:7: #include <map>
no longer necessary

Powered by Google App Engine
This is Rietveld 408576698