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 2494873003: [Sync] Allow sync start without sign-in if the local sync backend is on. (Closed)

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

Description

[Sync] Allow sync start without sign-in if the local sync backend is on. Makes all signed-in checks conditional on the local_sync_backend_enabled flag. Great care is taken for this change to have no side-effects on sync running in non-local mode. There are two major changes in this CL: 1. Move the logic checking the local sync flags from ProfileSyncService to ProfileSyncServiceFactory::BuildServiceInstanceFor. 2. Add checks and conditionally do checks if sign-in has happened only if the local sync backend flag is not set. Back up with tests that this works as expected. BUG=651409 TEST=components_unittests Committed: https://crrev.com/645df3089e27103dbe55998c0c3692236d281e53 Cr-Commit-Position: refs/heads/master@{#440075}

Patch Set 1 #

Patch Set 2 : Make SyncManager tests only run on Windows. #

Patch Set 3 : Rebased on ToT. #

Total comments: 6

Patch Set 4 : Address comments. #

Patch Set 5 : Don't start cloud services when in local sync mode. #

Patch Set 6 : Merge pref changes from https://codereview.chromium.org/2528163002/. #

Total comments: 14

Patch Set 7 : Address comments. #

Patch Set 8 : Fix an error in the switch to pref mapping. The switch meand pref == true. #

Patch Set 9 : Remove platform limitation for local backend core files. #

Patch Set 10 : Remove ifdefs around include. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -117 lines) Patch
M chrome/browser/history/web_history_service_factory.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/prefs/chrome_command_line_pref_store.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_factory.cc View 1 2 3 4 5 6 3 chunks +67 lines, -34 lines 0 comments Download
M chrome/browser/ui/sync/sync_promo_ui.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M components/browser_sync/profile_sync_service.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
M components/browser_sync/profile_sync_service.cc View 1 2 3 4 5 6 7 8 9 12 chunks +40 lines, -14 lines 0 comments Download
M components/browser_sync/profile_sync_service_unittest.cc View 1 2 3 4 5 6 2 chunks +30 lines, -7 lines 0 comments Download
M components/browsing_data/core/history_notice_utils_unittest.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M components/precache/content/precache_manager.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M components/suggestions/suggestions_service_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M components/sync/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -19 lines 0 comments Download
M components/sync/base/sync_prefs.cc View 1 2 3 4 5 2 chunks +16 lines, -1 line 0 comments Download
M components/sync/driver/fake_sync_service.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/driver/fake_sync_service.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M components/sync/driver/sync_service.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M components/sync/driver/sync_service_base.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/engine/engine_components_factory.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/engine/engine_components_factory_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/engine/engine_components_factory_impl.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M components/sync/engine/test_engine_components_factory.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/engine/test_engine_components_factory.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/sync_manager_impl.cc View 1 2 3 4 5 6 7 8 9 5 chunks +16 lines, -15 lines 0 comments Download
M components/sync/engine_impl/sync_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +42 lines, -4 lines 0 comments Download
M components/sync/engine_impl/sync_scheduler_impl.h View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M components/sync/engine_impl/sync_scheduler_impl.cc View 1 2 3 4 5 6 3 chunks +5 lines, -2 lines 0 comments Download
M components/sync/engine_impl/sync_scheduler_impl_unittest.cc View 1 2 3 chunks +60 lines, -1 line 0 comments Download
M components/sync/engine_impl/syncer_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/sync/test/engine/mock_connection_manager.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (18 generated)
pastarmovj
Hello Pavel, this is the next piece of the puzzle. Please review it when you ...
4 years, 1 month ago (2016-11-14 13:50:12 UTC) #3
pastarmovj
On 2016/11/14 13:50:12, pastarmovj wrote: > Hello Pavel, > > this is the next piece ...
4 years, 1 month ago (2016-11-17 13:40:29 UTC) #6
Nicolas Zea
I'm concerned about introducing this new boolean that you have to remember to check everywhere. ...
4 years, 1 month ago (2016-11-19 00:36:42 UTC) #10
pastarmovj
Hi Nicolas, Thanks for the review! I considered the option of mocking the sign-in manager ...
4 years, 1 month ago (2016-11-22 12:38:08 UTC) #11
Nicolas Zea
That raises a good point actually. One thing we need to ensure is that other ...
4 years, 1 month ago (2016-11-23 01:37:13 UTC) #12
pastarmovj
On 2016/11/23 01:37:13, Nicolas Zea wrote: > That raises a good point actually. One thing ...
4 years ago (2016-11-23 14:23:06 UTC) #13
Nicolas Zea
On 2016/11/23 14:23:06, pastarmovj wrote: > On 2016/11/23 01:37:13, Nicolas Zea wrote: > > That ...
4 years ago (2016-11-23 22:49:11 UTC) #14
pastarmovj
On 2016/11/23 22:49:11, Nicolas Zea wrote: > On 2016/11/23 14:23:06, pastarmovj wrote: > > On ...
4 years ago (2016-11-24 10:41:39 UTC) #15
Nicolas Zea
On 2016/11/24 10:41:39, pastarmovj wrote: > On 2016/11/23 22:49:11, Nicolas Zea wrote: > > On ...
4 years ago (2016-11-29 18:21:12 UTC) #16
pastarmovj
On 2016/11/29 18:21:12, Nicolas Zea wrote: > On 2016/11/24 10:41:39, pastarmovj wrote: > > On ...
4 years ago (2016-12-01 08:00:19 UTC) #17
Nicolas Zea
On 2016/12/01 08:00:19, pastarmovj wrote: > On 2016/11/29 18:21:12, Nicolas Zea wrote: > > On ...
4 years ago (2016-12-01 19:08:27 UTC) #18
pastarmovj
I finally managed to scrape time to address our discussion. Sorry for the delay there ...
4 years ago (2016-12-09 12:59:34 UTC) #20
Nicolas Zea
Thanks for making those changes! This mostly looks right, but I still am concerned that ...
4 years ago (2016-12-12 19:16:38 UTC) #21
pastarmovj
On 2016/12/12 19:16:38, Nicolas Zea wrote: > Thanks for making those changes! This mostly looks ...
4 years ago (2016-12-13 10:46:06 UTC) #22
Nicolas Zea
On 2016/12/13 10:46:06, pastarmovj wrote: > On 2016/12/12 19:16:38, Nicolas Zea wrote: > > Thanks ...
4 years ago (2016-12-15 00:37:14 UTC) #23
Nicolas Zea
(forgot to send the comments in the last message) https://codereview.chromium.org/2494873003/diff/120001/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc (right): https://codereview.chromium.org/2494873003/diff/120001/chrome/browser/profiles/profile.cc#newcode224 chrome/browser/profiles/profile.cc:224: ...
4 years ago (2016-12-15 00:37:29 UTC) #24
pastarmovj
PTAL. https://codereview.chromium.org/2494873003/diff/120001/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc (right): https://codereview.chromium.org/2494873003/diff/120001/chrome/browser/profiles/profile.cc#newcode224 chrome/browser/profiles/profile.cc:224: bool Profile::IsLocalSyncEnabled() { On 2016/12/15 00:37:28, Nicolas Zea ...
4 years ago (2016-12-16 17:04:48 UTC) #25
Nicolas Zea
Mostly LGTM with the one concern https://codereview.chromium.org/2494873003/diff/120001/components/sync/engine_impl/sync_manager_impl_unittest.cc File components/sync/engine_impl/sync_manager_impl_unittest.cc (right): https://codereview.chromium.org/2494873003/diff/120001/components/sync/engine_impl/sync_manager_impl_unittest.cc#newcode2700 components/sync/engine_impl/sync_manager_impl_unittest.cc:2700: #if defined(OS_WIN) On ...
4 years ago (2016-12-16 18:50:35 UTC) #26
pastarmovj
Hi Jochen, can you please review the changes in: chrome/browser/history/web_history_service_factory.cc chrome/browser/prefs/chrome_command_line_pref_store.cc components/browsing_data/core/history_notice_utils_unittest.cc components/precache/content/precache_manager.cc components/suggestions/suggestions_service.cc Thank ...
4 years ago (2016-12-19 11:12:00 UTC) #28
jochen (gone - plz use gerrit)
how will you make sure that all future uses of this system also check for ...
4 years ago (2016-12-19 11:59:22 UTC) #29
pastarmovj
On 2016/12/19 11:59:22, jochen wrote: > how will you make sure that all future uses ...
4 years ago (2016-12-19 12:46:03 UTC) #30
jochen (gone - plz use gerrit)
lgtm
4 years ago (2016-12-19 12:52:03 UTC) #31
Nicolas Zea
On 2016/12/19 11:12:00, pastarmovj wrote: > Hi Jochen, > can you please review the changes ...
4 years ago (2016-12-19 17:29:02 UTC) #32
pastarmovj
On 2016/12/19 17:29:02, Nicolas Zea wrote: > On 2016/12/19 11:12:00, pastarmovj wrote: > > Hi ...
4 years ago (2016-12-20 13:17:00 UTC) #35
Nicolas Zea
Thanks Julian! LGTM
4 years ago (2016-12-20 18:37:20 UTC) #38
pastarmovj
On 2016/12/20 18:37:20, Nicolas Zea wrote: > Thanks Julian! LGTM I thank you for the ...
4 years ago (2016-12-20 18:41:19 UTC) #39
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/2494873003/200001
4 years ago (2016-12-21 11:36:26 UTC) #42
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years ago (2016-12-21 12:45:54 UTC) #45
commit-bot: I haz the power
4 years ago (2016-12-21 12:48:23 UTC) #47
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/645df3089e27103dbe55998c0c3692236d281e53
Cr-Commit-Position: refs/heads/master@{#440075}

Powered by Google App Engine
This is Rietveld 408576698