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

Issue 2451843002: Add Store+Sync to reading list. (Closed)

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

Description

Add Store+Sync to reading list. This CL creates a ModelTypeService for reading list. This service will store persistent data for the Reading list model and sync data between devices. The previous store using NSUserDefaults will not be cleaned. As it was only accessible from canary behind an experimental flag, no user should be affected. BUG=661668 Committed: https://crrev.com/faa080c524c6a80c2ac276359e29dec8cf7946c4 Committed: https://crrev.com/01318f7c035d2f17ddbfc987b27db1dd6e6e1625 Cr-Original-Commit-Position: refs/heads/master@{#432845} Cr-Commit-Position: refs/heads/master@{#433162}

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : works! #

Total comments: 19

Patch Set 4 : experimental_flags #

Total comments: 33

Patch Set 5 : feedback #

Patch Set 6 : feedback #

Patch Set 7 : thread + reading_list_entry_unittests #

Patch Set 8 : reading_list_model_unittests #

Total comments: 33

Patch Set 9 : jif' feedback + reading_list_store_unittests #

Total comments: 2

Patch Set 10 : token + callback #

Patch Set 11 : rebase #

Total comments: 56

Patch Set 12 : Feedback #

Patch Set 13 : rebase #

Total comments: 1

Patch Set 14 : Pasting from gpaste #

Total comments: 3

Patch Set 15 : merge in store #

Patch Set 16 : rebase (distilled_url -> distilled_path) #

Total comments: 2

Patch Set 17 : added todo #

Patch Set 18 : rebase #

Patch Set 19 : disable by default #

Patch Set 20 : disable by default #

Patch Set 21 : fix xcode clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2153 lines, -431 lines) Patch
M components/browser_sync/profile_sync_components_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -0 lines 0 comments Download
M components/sync/protocol/reading_list_specifics.proto View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M ios/chrome/browser/reading_list/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +10 lines, -3 lines 0 comments Download
A ios/chrome/browser/reading_list/proto/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 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 14 15 2 chunks +17 lines, -3 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 13 14 15 3 chunks +66 lines, -0 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 13 14 15 16 17 5 chunks +244 lines, -3 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_entry_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +144 lines, -1 line 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +27 lines, -3 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +35 lines, -6 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_bridge_observer.h View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_bridge_observer.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -4 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 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 11 12 13 14 15 16 17 18 19 20 2 chunks +24 lines, -3 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +62 lines, -9 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +293 lines, -108 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_observer.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_storage.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +34 lines, -6 lines 0 comments Download
D ios/chrome/browser/reading_list/reading_list_model_storage_defaults.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -38 lines 0 comments Download
D ios/chrome/browser/reading_list/reading_list_model_storage_defaults.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -139 lines 0 comments Download
D ios/chrome/browser/reading_list/reading_list_model_storage_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -93 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +223 lines, -5 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 11 1 chunk +138 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +461 lines, -0 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_store_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +34 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 11 12 13 14 15 16 17 18 19 20 1 chunk +287 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_web_state_observer.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M ios/chrome/browser/sync/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/sync/ios_chrome_sync_client.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 72 (27 generated)
Olivier
Hi pavely, The CL is not ready for full review yet, but can you take ...
4 years, 1 month ago (2016-10-28 15:17:39 UTC) #2
skym
The comment on the .h file is the important one. Maybe you and Pavel have ...
4 years, 1 month ago (2016-10-28 16:30:56 UTC) #4
pavely
Thanks for digging through details of how to implement USS based type. GetClientTag is correct, ...
4 years, 1 month ago (2016-11-01 06:14:10 UTC) #5
skym
https://codereview.chromium.org/2451843002/diff/40001/ios/chrome/browser/reading_list/reading_list_store.h File ios/chrome/browser/reading_list/reading_list_store.h (right): https://codereview.chromium.org/2451843002/diff/40001/ios/chrome/browser/reading_list/reading_list_store.h#newcode121 ios/chrome/browser/reading_list/reading_list_store.h:121: std::unique_ptr<syncer::ModelTypeStore> store_; On 2016/10/28 16:30:56, skym wrote: > Hmm. ...
4 years, 1 month ago (2016-11-01 16:40:24 UTC) #6
skym
Mostly nits and comments to myself/sync team. I got a little bit side tracked looking ...
4 years, 1 month ago (2016-11-01 18:27:26 UTC) #7
Olivier
Thanks for the feedback. I am happy the general approach did not raise big issues. ...
4 years, 1 month ago (2016-11-02 14:57:11 UTC) #8
Olivier
+jif for iOS reading list.
4 years, 1 month ago (2016-11-02 14:57:32 UTC) #10
jif
first pass, did not look at the unittests yet. https://codereview.chromium.org/2451843002/diff/140001/components/browser_sync/profile_sync_components_factory_impl.cc File components/browser_sync/profile_sync_components_factory_impl.cc (right): https://codereview.chromium.org/2451843002/diff/140001/components/browser_sync/profile_sync_components_factory_impl.cc#newcode287 components/browser_sync/profile_sync_components_factory_impl.cc:287: ...
4 years, 1 month ago (2016-11-07 12:30:52 UTC) #13
Olivier
Thanks. I added unittests and fixed all comments. pavely or skym, could you take another ...
4 years, 1 month ago (2016-11-07 18:18:46 UTC) #14
pavely
Olivier. I thought about relationship between store and model objects, I don’t think we can ...
4 years, 1 month ago (2016-11-08 02:30:43 UTC) #15
Olivier
https://codereview.chromium.org/2451843002/diff/160001/ios/chrome/browser/reading_list/reading_list_store.cc File ios/chrome/browser/reading_list/reading_list_store.cc (right): https://codereview.chromium.org/2451843002/diff/160001/ios/chrome/browser/reading_list/reading_list_store.cc#newcode326 ios/chrome/browser/reading_list/reading_list_store.cc:326: model_->CallbackEntryReadStatusURL(GURL(url_string), add_to_batch_callback); On 2016/11/08 02:30:43, pavely wrote: > You ...
4 years, 1 month ago (2016-11-08 09:12:19 UTC) #16
Olivier
On 2016/11/08 02:30:43, pavely wrote: > Olivier. > > I thought about relationship between store ...
4 years, 1 month ago (2016-11-08 09:12:56 UTC) #17
Olivier
I removed the callback call and change the Begin/CommitTransaction to be a scoped token. Frankly, ...
4 years, 1 month ago (2016-11-08 14:58:12 UTC) #18
pavely
On 2016/11/08 14:58:12, Olivier Robin wrote: > I removed the callback call and change the ...
4 years, 1 month ago (2016-11-09 06:47:07 UTC) #19
Olivier
On 2016/11/09 06:47:07, pavely wrote: > On 2016/11/08 14:58:12, Olivier Robin wrote: > > I ...
4 years, 1 month ago (2016-11-09 08:13:52 UTC) #20
Olivier
I did a full rebase including the latest sync change. I hope I did that ...
4 years, 1 month ago (2016-11-09 17:16:37 UTC) #21
pavely
Olivier, I left bunch of cleanup nits and one important comment in reading_list_store.cc. PTAL https://codereview.chromium.org/2451843002/diff/200001/components/browser_sync/profile_sync_components_factory_impl.cc ...
4 years, 1 month ago (2016-11-14 07:45:34 UTC) #22
Olivier
Thanks! I understand that the sync framework will prevent sync loop (that was the reason ...
4 years, 1 month ago (2016-11-14 11:36:49 UTC) #23
jif
lgtm
4 years, 1 month ago (2016-11-15 16:28:33 UTC) #24
pavely
https://codereview.chromium.org/2451843002/diff/240001/ios/chrome/browser/reading_list/reading_list_store.cc File ios/chrome/browser/reading_list/reading_list_store.cc (right): https://codereview.chromium.org/2451843002/diff/240001/ios/chrome/browser/reading_list/reading_list_store.cc#newcode194 ios/chrome/browser/reading_list/reading_list_store.cc:194: // Perform the initial merge between local and sync ...
4 years, 1 month ago (2016-11-16 01:54:54 UTC) #25
Olivier
https://codereview.chromium.org/2451843002/diff/260001/ios/chrome/browser/reading_list/reading_list_store.cc File ios/chrome/browser/reading_list/reading_list_store.cc (right): https://codereview.chromium.org/2451843002/diff/260001/ios/chrome/browser/reading_list/reading_list_store.cc#newcode236 ios/chrome/browser/reading_list/reading_list_store.cc:236: batch_->WriteData(entry->URL().spec(), pb_entry->SerializeAsString()); pb_entry does not contain the local info ...
4 years, 1 month ago (2016-11-16 12:27:52 UTC) #26
Olivier
Hi pavely, I copied the change you put in gpaste (patch 14). I think this ...
4 years, 1 month ago (2016-11-16 15:03:16 UTC) #27
pavely
lgtm. I left a comment in reading_list_store. I don't propose to change anything in this ...
4 years, 1 month ago (2016-11-17 06:39:23 UTC) #28
Olivier
https://codereview.chromium.org/2451843002/diff/300001/ios/chrome/browser/reading_list/reading_list_store.cc File ios/chrome/browser/reading_list/reading_list_store.cc (right): https://codereview.chromium.org/2451843002/diff/300001/ios/chrome/browser/reading_list/reading_list_store.cc#newcode364 ios/chrome/browser/reading_list/reading_list_store.cc:364: change_processor()->Put(entry_sync_pb->entry_id(), On 2016/11/17 06:39:23, pavely wrote: > Important consideration ...
4 years, 1 month ago (2016-11-17 08:54:35 UTC) #29
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/2451843002/320001
4 years, 1 month ago (2016-11-17 08:55:08 UTC) #32
Olivier
Thanks a lot for these reviews!
4 years, 1 month ago (2016-11-17 08:55:50 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/337517)
4 years, 1 month ago (2016-11-17 08:57:45 UTC) #35
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/2451843002/340001
4 years, 1 month ago (2016-11-17 09:03:15 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/339470)
4 years, 1 month ago (2016-11-17 09:44:25 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/2451843002/360001
4 years, 1 month ago (2016-11-17 10:08:15 UTC) #43
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/108685)
4 years, 1 month ago (2016-11-17 10:38:31 UTC) #45
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/2451843002/380001
4 years, 1 month ago (2016-11-17 10:42:43 UTC) #48
commit-bot: I haz the power
Committed patchset #20 (id:380001)
4 years, 1 month ago (2016-11-17 11:35:14 UTC) #50
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/faa080c524c6a80c2ac276359e29dec8cf7946c4 Cr-Commit-Position: refs/heads/master@{#432845}
4 years, 1 month ago (2016-11-17 11:39:29 UTC) #52
Matt Giuca
A revert of this CL (patchset #20 id:380001) has been created in https://codereview.chromium.org/2507053005/ by mgiuca@chromium.org. ...
4 years, 1 month ago (2016-11-18 01:05:46 UTC) #53
Matt Giuca
On 2016/11/18 01:05:46, Matt Giuca wrote: > A revert of this CL (patchset #20 id:380001) ...
4 years, 1 month ago (2016-11-18 01:07:11 UTC) #54
Matt Giuca
On 2016/11/18 01:07:11, Matt Giuca wrote: > On 2016/11/18 01:05:46, Matt Giuca wrote: > > ...
4 years, 1 month ago (2016-11-18 01:07:36 UTC) #55
smut
On 2016/11/18 01:07:36, Matt Giuca wrote: > On 2016/11/18 01:07:11, Matt Giuca wrote: > > ...
4 years, 1 month ago (2016-11-18 02:22:43 UTC) #56
Matt Giuca
On 2016/11/18 02:22:43, smut wrote: > On 2016/11/18 01:07:36, Matt Giuca wrote: > > On ...
4 years, 1 month ago (2016-11-18 02:25:33 UTC) #57
Olivier
On 2016/11/18 02:25:33, Matt Giuca wrote: > On 2016/11/18 02:22:43, smut wrote: > > On ...
4 years, 1 month ago (2016-11-18 07:54:01 UTC) #59
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/2451843002/400001
4 years, 1 month ago (2016-11-18 07:54:41 UTC) #62
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/2451843002/420001
4 years, 1 month ago (2016-11-18 08:12:17 UTC) #67
commit-bot: I haz the power
Committed patchset #21 (id:420001)
4 years, 1 month ago (2016-11-18 09:45:42 UTC) #69
commit-bot: I haz the power
Patchset 21 (id:??) landed as https://crrev.com/01318f7c035d2f17ddbfc987b27db1dd6e6e1625 Cr-Commit-Position: refs/heads/master@{#433162}
4 years, 1 month ago (2016-11-18 09:48:05 UTC) #71
Matt Giuca
4 years, 1 month ago (2016-11-20 23:26:31 UTC) #72
Message was sent while issue was closed.
On 2016/11/18 09:48:05, commit-bot: I haz the power wrote:
> Patchset 21 (id:??) landed as
> https://crrev.com/01318f7c035d2f17ddbfc987b27db1dd6e6e1625
> Cr-Commit-Position: refs/heads/master@{#433162}

Hi Olivier,

> For the fix, you should not return std::move(processor) as this is preventing
> compilation optimization.

It looks like you did go with "std::move(processor)"... but anyway it's a test
so extreme optimization isn't that necessary.

Thanks for fixing this.

Powered by Google App Engine
This is Rietveld 408576698