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

Issue 2369303002: Reading List create protobuf store (Closed)

Created:
4 years, 2 months ago by Olivier
Modified:
4 years, 1 month ago
CC:
chromium-reviews, sync-reviews_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reading List create protobuf store BUG=

Patch Set 1 #

Patch Set 2 : fixsync #

Patch Set 3 : fix crash #

Patch Set 4 : cleaning #

Total comments: 41

Patch Set 5 : feedback #

Total comments: 3

Patch Set 6 : unittests #

Patch Set 7 : mm->cc #

Patch Set 8 : threads #

Total comments: 1

Patch Set 9 : fix references #

Patch Set 10 : rebase #

Patch Set 11 : split proto #

Total comments: 4

Patch Set 12 : missing dep #

Total comments: 2

Patch Set 13 : make constructor private #

Total comments: 4

Patch Set 14 : feedback #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+975 lines, -426 lines) Patch
M ios/chrome/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -4 lines 0 comments Download
M ios/chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -22 lines 0 comments Download
M ios/chrome/browser/prefs/browser_prefs.mm View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +64 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/proto/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +20 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/proto/reading_list.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +28 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_entry.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +47 lines, -5 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_entry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +166 lines, -4 lines 2 comments Download
M ios/chrome/browser/reading_list/reading_list_model.h View 2 chunks +11 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model.cc View 1 2 3 4 5 6 7 8 2 chunks +23 lines, -4 lines 1 comment Download
M ios/chrome/browser/reading_list/reading_list_model_factory.h View 2 chunks +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_factory.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +31 lines, -4 lines 4 comments Download
M ios/chrome/browser/reading_list/reading_list_model_impl.h View 1 2 3 4 2 chunks +19 lines, -9 lines 2 comments Download
M ios/chrome/browser/reading_list/reading_list_model_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +169 lines, -86 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_storage.h View 1 2 3 1 chunk +25 lines, -10 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_storage_defaults.h View 1 2 3 1 chunk +0 lines, -40 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_storage_defaults.mm View 1 2 3 1 chunk +0 lines, -147 lines 0 comments Download
D ios/chrome/browser/reading_list/reading_list_model_storage_unittest.mm View 1 2 3 4 5 1 chunk +0 lines, -91 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_pref_names.h View 1 chunk +18 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_store.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +48 lines, -0 lines 2 comments Download
A ios/chrome/browser/reading_list/reading_list_store.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +128 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_store_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +153 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 26 (6 generated)
Olivier
4 years, 2 months ago (2016-09-27 15:52:13 UTC) #2
Olivier
On 2016/09/27 15:52:13, Olivier Robin wrote: I will also update unittests
4 years, 2 months ago (2016-09-27 15:58:17 UTC) #3
jif-google
first pass https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc File ios/chrome/browser/reading_list/reading_list_entry.cc (right): https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc#newcode15 ios/chrome/browser/reading_list/reading_list_entry.cc:15: static base::TickClock* clock = new base::DefaultTickClock(); Wouldn't ...
4 years, 2 months ago (2016-09-27 16:39:03 UTC) #5
gambard
https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc File ios/chrome/browser/reading_list/reading_list_entry.cc (right): https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc#newcode14 ios/chrome/browser/reading_list/reading_list_entry.cc:14: base::TickClock* ReadingListTickClock() { Do you need with? You are ...
4 years, 2 months ago (2016-09-28 09:19:08 UTC) #6
Olivier
Thanks. PTAL https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc File ios/chrome/browser/reading_list/reading_list_entry.cc (right): https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_entry.cc#newcode14 ios/chrome/browser/reading_list/reading_list_entry.cc:14: base::TickClock* ReadingListTickClock() { On 2016/09/28 09:19:08, gambard ...
4 years, 2 months ago (2016-09-28 11:20:06 UTC) #7
gambard
Quick review as this made me crash, I will do a second pass later. https://codereview.chromium.org/2369303002/diff/80001/ios/chrome/browser/reading_list/reading_list_model_impl.cc ...
4 years, 2 months ago (2016-09-28 16:19:48 UTC) #8
Olivier
Thanks PTAL https://codereview.chromium.org/2369303002/diff/80001/ios/chrome/browser/reading_list/reading_list_model_impl.cc File ios/chrome/browser/reading_list/reading_list_model_impl.cc (right): https://codereview.chromium.org/2369303002/diff/80001/ios/chrome/browser/reading_list/reading_list_model_impl.cc#newcode186 ios/chrome/browser/reading_list/reading_list_model_impl.cc:186: unread_->erase(result); On 2016/09/28 16:19:47, gambard wrote: > ...
4 years, 2 months ago (2016-09-28 17:03:37 UTC) #9
Olivier
+pavel for USS integration
4 years, 2 months ago (2016-10-03 07:28:43 UTC) #11
jif
lgtm https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_model_impl.cc File ios/chrome/browser/reading_list/reading_list_model_impl.cc (right): https://codereview.chromium.org/2369303002/diff/60001/ios/chrome/browser/reading_list/reading_list_model_impl.cc#newcode69 ios/chrome/browser/reading_list/reading_list_model_impl.cc:69: return unread_size() && has_unseen_; On 2016/09/28 11:20:06, Olivier ...
4 years, 2 months ago (2016-10-03 07:50:03 UTC) #12
gambard
lgtm with one comment https://codereview.chromium.org/2369303002/diff/140001/ios/chrome/browser/reading_list/reading_list_entry.cc File ios/chrome/browser/reading_list/reading_list_entry.cc (right): https://codereview.chromium.org/2369303002/diff/140001/ios/chrome/browser/reading_list/reading_list_entry.cc#newcode14 ios/chrome/browser/reading_list/reading_list_entry.cc:14: base::TickClock* ReadingListTickClock() { I really ...
4 years, 2 months ago (2016-10-03 08:08:43 UTC) #13
Olivier
+noyau for RL +sdefresne for gn and prefs +pavely for sync and USS compatibility
4 years, 2 months ago (2016-10-06 09:30:25 UTC) #15
noyau (Ping after 24h)
https://codereview.chromium.org/2369303002/diff/200001/ios/chrome/browser/reading_list/reading_list_entry.h File ios/chrome/browser/reading_list/reading_list_entry.h (right): https://codereview.chromium.org/2369303002/diff/200001/ios/chrome/browser/reading_list/reading_list_entry.h#newcode42 ios/chrome/browser/reading_list/reading_list_entry.h:42: std::unique_ptr<net::BackoffEntry> backoff); If it is only used by the ...
4 years, 2 months ago (2016-10-06 09:56:20 UTC) #16
Olivier
https://codereview.chromium.org/2369303002/diff/200001/ios/chrome/browser/reading_list/reading_list_entry.h File ios/chrome/browser/reading_list/reading_list_entry.h (right): https://codereview.chromium.org/2369303002/diff/200001/ios/chrome/browser/reading_list/reading_list_entry.h#newcode42 ios/chrome/browser/reading_list/reading_list_entry.h:42: std::unique_ptr<net::BackoffEntry> backoff); On 2016/10/06 09:56:19, noyau wrote: > If ...
4 years, 2 months ago (2016-10-06 11:58:16 UTC) #17
noyau (Ping after 24h)
lgtm
4 years, 2 months ago (2016-10-06 13:01:25 UTC) #18
sdefresne
not lgtm as is https://codereview.chromium.org/2369303002/diff/240001/ios/chrome/BUILD.gn File ios/chrome/BUILD.gn (right): https://codereview.chromium.org/2369303002/diff/240001/ios/chrome/BUILD.gn#newcode142 ios/chrome/BUILD.gn:142: include_dirs = [ "$root_gen_dir/components/sync/protocol" ] ...
4 years, 2 months ago (2016-10-06 15:11:24 UTC) #19
Olivier
Thanks! PTAL https://codereview.chromium.org/2369303002/diff/240001/ios/chrome/browser/reading_list/reading_list_pref_names.cc File ios/chrome/browser/reading_list/reading_list_pref_names.cc (right): https://codereview.chromium.org/2369303002/diff/240001/ios/chrome/browser/reading_list/reading_list_pref_names.cc#newcode10 ios/chrome/browser/reading_list/reading_list_pref_names.cc:10: // Boolean which if some reading list ...
4 years, 2 months ago (2016-10-07 07:30:13 UTC) #21
sdefresne
Looked in more details, and there are a few design decision I don't really understand, ...
4 years, 2 months ago (2016-10-07 09:44:30 UTC) #22
jif-google
https://codereview.chromium.org/2369303002/diff/280001/ios/chrome/browser/reading_list/reading_list_model_impl.h File ios/chrome/browser/reading_list/reading_list_model_impl.h (right): https://codereview.chromium.org/2369303002/diff/280001/ios/chrome/browser/reading_list/reading_list_model_impl.h#newcode64 ios/chrome/browser/reading_list/reading_list_model_impl.h:64: virtual void ModelLoaded(std::unique_ptr<ReadingListEntries> unread, On 2016/10/07 09:44:30, sdefresne wrote: ...
4 years, 2 months ago (2016-10-07 09:51:34 UTC) #23
pavely
My main comment is about use of ProtoDatabase as a storage. In USS we want ...
4 years, 2 months ago (2016-10-09 04:13:59 UTC) #24
olivierrobin
4 years, 2 months ago (2016-10-09 06:42:57 UTC) #25
On 2016/10/09 04:13:59, pavely wrote:
> My main comment is about use of ProtoDatabase as a storage.
> 
> In USS we want to store data records and sync metadata in the same database
and
> update them atomically. Sync metadata has different structure from data
records
> and cannot be stored in the same record with data, it needs to be stored in
> separate records.
> 
> ProtoDatabase stores homogeneous records, it is not designed to store records
> with different protobufs for values. Because of the above requirements
> ProtoDatabase cannot be used to store synced data in USS based component.
> 
> We implemented ModelTypeStore that is also leveldb based. I think it will work
> for Reading List scenarios. Could you take a look at it:
> https://cs.chromium.org/chromium/src/components/sync/api/model_type_store.h

Yes.
This CL was done before the USS change and I have a CL to use a ModelTypeStore
instead.
I kept them separated for review purpose, but the store in this CL will never be
used.

ModelTypeStore seems to work, but I am now working on merging data (and trying
to understand what to do exactly with metadata).
I will send you the next CL soon.

Powered by Google App Engine
This is Rietveld 408576698