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

Issue 1421003007: [Sync] Componentize ProfileSyncComponentsFactoryImpl (Closed)

Created:
5 years, 1 month ago by Nicolas Zea
Modified:
5 years, 1 month ago
Reviewers:
Devlin, blundell
CC:
chromium-reviews, tim+watch_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org, zea+watch_chromium.org, blundell+watchlist_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Componentize ProfileSyncComponentsFactoryImpl Componentize ProfileSyncComponentsFactoryImpl into browser_sync component. As part of this, pull out RegisterDesktopDatatypes method into ChromeSyncClient. Similarly, a RegisterAndroidDataTypes is created instead for Android platforms. Because profile_sync_components_factory_impl_unittest.cc was really duplicating and testing the logic from ProfileSyncServiceFactory, went ahead and moved the test cases over into profile_sync_service_factory_unittest.cc. BUG=512768 TBR=rdevlin.cronin@chromium.org Committed: https://crrev.com/7db382299ca33ffb369f9c79a5331bbfbab259bc Cr-Commit-Position: refs/heads/master@{#359916}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address feedback #

Patch Set 3 : Self review #

Patch Set 4 : Fix browser_tests #

Total comments: 4

Patch Set 5 : Address feedback #

Total comments: 4

Patch Set 6 : Have ChromeSyncClient create its own SyncApiComponentFactory #

Total comments: 1

Patch Set 7 : Rebase #

Patch Set 8 : Fix sessions api test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+577 lines, -1253 lines) Patch
M chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc View 1 2 3 4 5 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/sessions/sessions_apitest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/sync/chrome_sync_client.h View 1 2 3 4 5 4 chunks +21 lines, -5 lines 0 comments Download
M chrome/browser/sync/chrome_sync_client.cc View 1 2 3 4 5 7 chunks +181 lines, -6 lines 0 comments Download
D chrome/browser/sync/profile_sync_components_factory_impl.h View 1 chunk +0 lines, -116 lines 0 comments Download
D chrome/browser/sync/profile_sync_components_factory_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -554 lines 0 comments Download
D chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -181 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_factory.cc View 1 2 3 4 5 5 chunks +7 lines, -17 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_factory_unittest.cc View 1 2 3 4 5 6 2 chunks +110 lines, -5 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.cc View 1 2 3 4 5 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_startup_unittest.cc View 1 2 3 4 5 6 5 chunks +16 lines, -15 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 7 chunks +16 lines, -10 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 3 4 5 2 chunks +20 lines, -19 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M components/browser_sync.gypi View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M components/browser_sync/browser/BUILD.gn View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M components/browser_sync/browser/DEPS View 1 chunk +5 lines, -1 line 0 comments Download
A + components/browser_sync/browser/profile_sync_components_factory_impl.h View 1 2 5 chunks +26 lines, -29 lines 0 comments Download
A + components/browser_sync/browser/profile_sync_components_factory_impl.cc View 1 2 3 4 5 6 17 chunks +71 lines, -225 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M components/browser_sync/browser/profile_sync_service.cc View 1 2 3 4 5 4 chunks +38 lines, -38 lines 0 comments Download
M components/sync_driver/fake_sync_client.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M components/sync_driver/fake_sync_client.cc View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M components/sync_driver/generic_change_processor_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/sync_driver/shared_change_processor_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/sync_driver/sync_api_component_factory.h View 1 3 chunks +9 lines, -2 lines 0 comments Download
M components/sync_driver/sync_api_component_factory_mock.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M components/sync_driver/sync_client.h View 1 2 3 4 5 4 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 25 (8 generated)
Nicolas Zea
+Colin, PTAL
5 years, 1 month ago (2015-11-09 21:52:47 UTC) #2
blundell
Looks good! Mostly nits, with one bigger question about the unittest. https://codereview.chromium.org/1421003007/diff/1/chrome/browser/sync/chrome_sync_client.cc File chrome/browser/sync/chrome_sync_client.cc (right): ...
5 years, 1 month ago (2015-11-10 15:24:25 UTC) #3
blundell
I'm OOO for a French holiday tomorrow, btw.
5 years, 1 month ago (2015-11-10 16:10:49 UTC) #4
Nicolas Zea
PTAL! https://codereview.chromium.org/1421003007/diff/1/chrome/browser/sync/chrome_sync_client.cc File chrome/browser/sync/chrome_sync_client.cc (right): https://codereview.chromium.org/1421003007/diff/1/chrome/browser/sync/chrome_sync_client.cc#newcode456 chrome/browser/sync/chrome_sync_client.cc:456: void ChromeSyncClient::RegisterDesktopDataTypes( On 2015/11/10 15:24:24, blundell wrote: > ...
5 years, 1 month ago (2015-11-11 00:06:20 UTC) #5
blundell
As an alternative solution to the problem of inverting the creation ordering between ProfileSyncComponentsFactoryImpl and ...
5 years, 1 month ago (2015-11-12 10:03:35 UTC) #7
blundell
https://codereview.chromium.org/1421003007/diff/80001/chrome/browser/sync/profile_sync_service_factory.cc File chrome/browser/sync/profile_sync_service_factory.cc (right): https://codereview.chromium.org/1421003007/diff/80001/chrome/browser/sync/profile_sync_service_factory.cc#newcode168 chrome/browser/sync/profile_sync_service_factory.cc:168: OAuth2TokenService::ScopeSet scope_set; it seems like this isn't used either?
5 years, 1 month ago (2015-11-12 10:33:47 UTC) #8
Nicolas Zea
On 2015/11/12 10:03:35, blundell wrote: > As an alternative solution to the problem of inverting ...
5 years, 1 month ago (2015-11-12 18:50:50 UTC) #9
Nicolas Zea
https://codereview.chromium.org/1421003007/diff/80001/chrome/browser/sync/chrome_sync_client.cc File chrome/browser/sync/chrome_sync_client.cc (right): https://codereview.chromium.org/1421003007/diff/80001/chrome/browser/sync/chrome_sync_client.cc#newcode465 chrome/browser/sync/chrome_sync_client.cc:465: weak_ptr_factory_.GetWeakPtr()); On 2015/11/12 10:03:34, blundell wrote: > this shouldn't ...
5 years, 1 month ago (2015-11-12 19:07:29 UTC) #10
blundell
On 2015/11/12 18:50:50, Nicolas Zea wrote: > On 2015/11/12 10:03:35, blundell wrote: > > As ...
5 years, 1 month ago (2015-11-12 19:57:00 UTC) #11
blundell
As you're the owner here, it's your call as to which flow you prefer. lgtm ...
5 years, 1 month ago (2015-11-13 09:33:56 UTC) #12
Nicolas Zea
I like your suggestion. We should focus on keeping the normal initialization as simple as ...
5 years, 1 month ago (2015-11-14 00:52:26 UTC) #14
blundell
LGTM Test failures look real though, unfortunately. https://codereview.chromium.org/1421003007/diff/140001/chrome/browser/sync/chrome_sync_client.cc File chrome/browser/sync/chrome_sync_client.cc (right): https://codereview.chromium.org/1421003007/diff/140001/chrome/browser/sync/chrome_sync_client.cc#newcode193 chrome/browser/sync/chrome_sync_client.cc:193: component_factory_.reset(new ProfileSyncComponentsFactoryImpl( ...
5 years, 1 month ago (2015-11-16 08:43:10 UTC) #15
Nicolas Zea
+TBR Devlin for callsite changes to the extension tests.
5 years, 1 month ago (2015-11-16 20:28:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421003007/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421003007/180001
5 years, 1 month ago (2015-11-16 20:29:55 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:180001)
5 years, 1 month ago (2015-11-16 21:08:55 UTC) #23
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/7db382299ca33ffb369f9c79a5331bbfbab259bc Cr-Commit-Position: refs/heads/master@{#359916}
5 years, 1 month ago (2015-11-16 21:09:50 UTC) #24
loyso (OOO)
5 years, 1 month ago (2015-11-17 03:23:34 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:180001) has been created in
https://codereview.chromium.org/1451023005/ by loyso@chromium.org.

The reason for reverting is: Fails unit tests on Android builds:
ProfileSyncServiceFactoryTest.CreatePSSDisableOne
ProfileSyncServiceFactoryTest.CreatePSSDisableMultiple
ProfileSyncServiceFactoryTest.CreatePSSDefault.

Powered by Google App Engine
This is Rietveld 408576698