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

Issue 2044303004: Sync: Support multiple setup UIs. (Closed)

Created:
4 years, 6 months ago by tommycli
Modified:
4 years, 6 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, msramek+watch_chromium.org, michaelpg+watch-options_chromium.org, michaelpg+watch-md-settings_chromium.org, pam+watch_chromium.org, markusheintz_, stevenjb+watch-md-settings_chromium.org, dbeam+watch-settings_chromium.org, sync-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sync: Support multiple setup UIs. Replaces the SetSetupInProgress mechanism with a scoped GetSetupInProgressHandle mechanism. This has two advantages: 1. Allows for multiple simultaneously open Setup UIs. 2. Prevents a buggy UI from blocking Sync indefinitely by forgetting to SetSetupInProgress(false). BUG=563721 Committed: https://crrev.com/12c4b7c0a33a0b4d4d2ea0746325e8a371272248 Cr-Commit-Position: refs/heads/master@{#399581}

Patch Set 1 #

Total comments: 3

Patch Set 2 : fix ios #

Patch Set 3 : fix android #

Total comments: 20

Patch Set 4 : #

Total comments: 3

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Patch Set 7 : fix old tests #

Total comments: 6

Patch Set 8 : Merge remote-tracking branch 'refs/remotes/origin/master' into 0179-settings-people-make-pss-suppor… #

Patch Set 9 : address comments #

Total comments: 7

Patch Set 10 : rename variable #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -80 lines) Patch
M chrome/browser/browsing_data/history_counter_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_service.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_service.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_android.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/profile_sync_service_harness.h View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/profile_sync_service_harness.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_sync_starter.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/sync/one_click_signin_sync_starter.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/options/sync_setup_handler.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/sync_setup_handler.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/settings/people_handler.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/settings/people_handler.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/settings/people_handler_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/browser_sync/browser/profile_sync_service.h View 1 2 3 4 5 6 7 8 4 chunks +17 lines, -7 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service.cc View 1 2 3 4 5 6 7 8 2 chunks +27 lines, -8 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service_mock.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 1 comment Download
M components/browser_sync/browser/profile_sync_service_startup_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +9 lines, -9 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M components/sync_driver/fake_sync_service.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/sync_driver/fake_sync_service.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M components/sync_driver/sync_service.h View 1 2 3 4 5 4 chunks +23 lines, -8 lines 0 comments Download
M components/sync_driver/sync_service.cc View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download
M ios/chrome/browser/sync/sync_setup_service.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M ios/chrome/browser/sync/sync_setup_service.cc View 1 2 3 4 5 6 7 8 9 5 chunks +5 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 42 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044303004/1
4 years, 6 months ago (2016-06-09 17:02:53 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/18970) ios-simulator-gn on ...
4 years, 6 months ago (2016-06-09 17:15:44 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044303004/60001
4 years, 6 months ago (2016-06-09 17:30:42 UTC) #7
tommycli
zea: PTAL, this is the GetSetupInProgressHandle() Sync service refactor we discussed on email a few ...
4 years, 6 months ago (2016-06-09 17:46:38 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-09 18:39:34 UTC) #13
maxbogue
Overall I like this change! A few comments on things, as well as a general ...
4 years, 6 months ago (2016-06-09 20:04:15 UTC) #15
Nicolas Zea
https://codereview.chromium.org/2044303004/diff/1/components/sync_driver/sync_service.cc File components/sync_driver/sync_service.cc (right): https://codereview.chromium.org/2044303004/diff/1/components/sync_driver/sync_service.cc#newcode31 components/sync_driver/sync_service.cc:31: base::Unretained(this)))); On 2016/06/09 17:46:38, tommycli wrote: > Will the ...
4 years, 6 months ago (2016-06-09 23:02:01 UTC) #16
tommycli
maxbogue/zea: Thank you for the fast feedback. I think I was able to implement all ...
4 years, 6 months ago (2016-06-10 00:04:16 UTC) #17
maxbogue
lgtm w/ a couple little comments; please wait for Nicolas to take a look as ...
4 years, 6 months ago (2016-06-10 17:28:47 UTC) #18
tommycli
maxbogue: Thanks! https://codereview.chromium.org/2044303004/diff/80001/components/sync_driver/sync_service.h File components/sync_driver/sync_service.h (right): https://codereview.chromium.org/2044303004/diff/80001/components/sync_driver/sync_service.h#newcode57 components/sync_driver/sync_service.h:57: friend class ::ProfileSyncService; On 2016/06/10 17:28:46, maxbogue ...
4 years, 6 months ago (2016-06-10 18:58:21 UTC) #19
Nicolas Zea
lgtm https://codereview.chromium.org/2044303004/diff/140001/components/browser_sync/browser/profile_sync_service.cc File components/browser_sync/browser/profile_sync_service.cc (right): https://codereview.chromium.org/2044303004/diff/140001/components/browser_sync/browser/profile_sync_service.cc#newcode2552 components/browser_sync/browser/profile_sync_service.cc:2552: void ProfileSyncService::OnSetupInProgressHandleDestroyed() { nit: maybe DCHECK that the ...
4 years, 6 months ago (2016-06-13 20:01:00 UTC) #20
tommycli
zea: thank you! https://codereview.chromium.org/2044303004/diff/140001/components/browser_sync/browser/profile_sync_service.cc File components/browser_sync/browser/profile_sync_service.cc (right): https://codereview.chromium.org/2044303004/diff/140001/components/browser_sync/browser/profile_sync_service.cc#newcode2552 components/browser_sync/browser/profile_sync_service.cc:2552: void ProfileSyncService::OnSetupInProgressHandleDestroyed() { On 2016/06/13 20:01:00, ...
4 years, 6 months ago (2016-06-13 20:27:32 UTC) #21
tommycli
thestig: May I have an OWNERS stamp on the leftover files on chrome/? Leftover files: ...
4 years, 6 months ago (2016-06-13 20:31:58 UTC) #23
Nicolas Zea
On 2016/06/13 20:27:32, tommycli wrote: > zea: thank you! > > https://codereview.chromium.org/2044303004/diff/140001/components/browser_sync/browser/profile_sync_service.cc > File components/browser_sync/browser/profile_sync_service.cc ...
4 years, 6 months ago (2016-06-13 20:36:30 UTC) #24
tommycli
zea / maxbogue: thanks for the reviews!
4 years, 6 months ago (2016-06-13 20:38:01 UTC) #25
Lei Zhang
lgtm https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h File chrome/browser/supervised_user/supervised_user_service.h (right): https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h#newcode416 chrome/browser/supervised_user/supervised_user_service.h:416: // Handle preventing Sync from running until configuration ...
4 years, 6 months ago (2016-06-13 20:38:51 UTC) #26
tommycli
https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h File chrome/browser/supervised_user/supervised_user_service.h (right): https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h#newcode416 chrome/browser/supervised_user/supervised_user_service.h:416: // Handle preventing Sync from running until configuration is ...
4 years, 6 months ago (2016-06-13 21:08:37 UTC) #27
Lei Zhang
https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h File chrome/browser/supervised_user/supervised_user_service.h (right): https://codereview.chromium.org/2044303004/diff/180001/chrome/browser/supervised_user/supervised_user_service.h#newcode417 chrome/browser/supervised_user/supervised_user_service.h:417: std::unique_ptr<sync_driver::SyncSetupInProgressHandle> setup_handle_; On 2016/06/13 21:08:34, tommycli wrote: > Seems ...
4 years, 6 months ago (2016-06-13 21:19:31 UTC) #28
tommycli
thestig: thanks!
4 years, 6 months ago (2016-06-13 21:21:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044303004/200001
4 years, 6 months ago (2016-06-13 21:22:43 UTC) #32
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 6 months ago (2016-06-13 22:38:24 UTC) #34
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-13 22:38:50 UTC) #35
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/12c4b7c0a33a0b4d4d2ea0746325e8a371272248 Cr-Commit-Position: refs/heads/master@{#399581}
4 years, 6 months ago (2016-06-13 22:40:11 UTC) #37
kjellander_chromium
A revert of this CL (patchset #10 id:200001) has been created in https://codereview.chromium.org/2066493003/ by kjellander@chromium.org. ...
4 years, 6 months ago (2016-06-14 08:32:24 UTC) #38
bzanotti
https://codereview.chromium.org/2044303004/diff/200001/components/browser_sync/browser/profile_sync_service_mock.h File components/browser_sync/browser/profile_sync_service_mock.h (right): https://codereview.chromium.org/2044303004/diff/200001/components/browser_sync/browser/profile_sync_service_mock.h#newcode99 components/browser_sync/browser/profile_sync_service_mock.h:99: MOCK_METHOD0(OnSetupInProgressHandleDestroyed, void()); This is only a replacement for SetSetupInProgress(false), ...
4 years, 6 months ago (2016-06-14 09:47:20 UTC) #40
tommycli
On 2016/06/14 09:47:20, bzanotti wrote: > https://codereview.chromium.org/2044303004/diff/200001/components/browser_sync/browser/profile_sync_service_mock.h > File components/browser_sync/browser/profile_sync_service_mock.h (right): > > https://codereview.chromium.org/2044303004/diff/200001/components/browser_sync/browser/profile_sync_service_mock.h#newcode99 > ...
4 years, 6 months ago (2016-06-14 17:11:35 UTC) #41
bzanotti
4 years, 6 months ago (2016-06-15 08:45:51 UTC) #42
Message was sent while issue was closed.
On 2016/06/14 17:11:35, tommycli wrote:
> bzanotti: Hi, it's not possible to add a MOCK for GetSetupInProgressHandle, as
> that returns a noncopyable smart pointer. Gmock can only mock methods that
> return copyable types.
> 
> That being said - The error isn't caused by the missing mock, but rather
> SupervisedUserService not releasing sync_blocker_ within its Shutdown method.
> That was fixed in Patchset 2 here: https://codereview.chromium.org/2064183002/

Sorry, I didn't add the context, but I was not referring to this failure. This
was actually also breaking some unittests in Chrome iOS (downstream, so
invisible from Chromium) where we mock SetSetupInProgress(true).

I now understand why this can't be done, and we'll fix our issue another way.
Thanks!

Powered by Google App Engine
This is Rietveld 408576698