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

Issue 2948603002: [Sync] Get SyncServce instead of ProfileSyncService. (Closed)

Created:
3 years, 6 months ago by skym
Modified:
3 years, 6 months ago
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Get SyncServce instead of ProfileSyncService. In unit tests we call SetTestingFactoryAndUse to override how the ProfileSyncServiceFactory works, and return a SyncService > FakeSyncService > TestSyncService object. However, in these same unit tests, we cause the SyncInternalsMessageHandler to call ProfileSyncServiceFactory::GetForProfile which statically casts to ProfileSyncService (which extends SyncServiceBase and SyncService), which is clearly an invalid cast. This fix switches SyncInternalsMessageHandler's behavior to retrieve only a SyncService (which is all it uses anyways). It seems that in the future we may want to auto retrievals from ProfileSyncServiceFactory and see if we can switch more people to use the SyncService interface only. My understanding is that long term everyone external to Sync should just use SyncService and we will no longer need to expose the concrete ProfileSyncService, but we are currently very far from that world being reality. BUG=731884 Review-Url: https://codereview.chromium.org/2948603002 Cr-Commit-Position: refs/heads/master@{#480831} Committed: https://chromium.googlesource.com/chromium/src/+/481300507088191e19ebc7f9d722cb58d80cdcdf

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M chrome/browser/sync/profile_sync_service_factory.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (14 generated)
skym
PTAL
3 years, 6 months ago (2017-06-19 18:51:14 UTC) #6
Patrick Noland
lgtm
3 years, 6 months ago (2017-06-19 20:51:06 UTC) #10
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/2948603002/1
3 years, 6 months ago (2017-06-19 21:10:53 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/467818)
3 years, 6 months ago (2017-06-19 21:22:20 UTC) #14
skym
+calamity for chrome/browser/ui/webui/ OWNERS, PTAL
3 years, 6 months ago (2017-06-19 21:24:18 UTC) #16
calamity
sync_internals_message_handler.cc lgtm.
3 years, 6 months ago (2017-06-20 03:35:29 UTC) #17
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/2948603002/1
3 years, 6 months ago (2017-06-20 15:43:30 UTC) #19
commit-bot: I haz the power
3 years, 6 months ago (2017-06-20 15:48:17 UTC) #22
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/481300507088191e19ebc7f9d722...

Powered by Google App Engine
This is Rietveld 408576698