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

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed)

Created:
8 years, 4 months ago by Raghu Simha
Modified:
8 years, 4 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, ncarter (slow), akalin, Raghu Simha, estade+watch_chromium.org, tim (not reviewing)
Visibility:
Public.

Description

[sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeManagerOserver interface As of today, DataTypeManager sends out notifications for various configure events via NotificationService notifications. This is bad, because other services that depend on these events need to have knowledge of DataTypeManager, which is internal to the sync implementation. This patch does the following: 1) Creates a new DatTypeManagerObserver interface through which observers are made aware of configure events. 2) Has ProfileSyncService implement the interface. 3) Gets rid of unnecessary sync configure * notification types. 4) Has PSS send out notifications for SYNC_CONFIGURE_START and SYNC_CONFIGURE_DONE. 5) Allows ForeignSessionHandler to listen to SYNC_CONFIGURE_DONE notifications from the PSS, instead of from all sources, while waiting to populate the "other devices" section of the NTP. 6) Updates various mock and test classes and fixes unit tests. TBR=estade@chromium.org, thakis@chromium.org BUG=142984, 124717, 111676, 142550 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152170

Patch Set 1 : #

Total comments: 12

Patch Set 2 : CR Feedback + rebase #

Total comments: 4

Patch Set 3 : Restore expectations in DTMImpl unittest + Treat observer_ as const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+296 lines, -337 lines) Patch
M chrome/browser/sync/glue/data_type_manager.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl.h View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl.cc View 1 7 chunks +10 lines, -29 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl_unittest.cc View 1 2 19 chunks +42 lines, -40 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_mock.h View 1 1 chunk +0 lines, -35 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_mock.cc View 1 chunk +0 lines, -25 lines 0 comments Download
A chrome/browser/sync/glue/data_type_manager_observer.h View 1 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_components_factory.h View 1 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_components_factory_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_components_factory_impl.cc View 1 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_components_factory_mock.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 4 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 5 chunks +119 lines, -131 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_password_unittest.cc View 1 3 chunks +5 lines, -17 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_startup_unittest.cc View 1 6 chunks +19 lines, -11 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_typed_url_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 1 chunk +4 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/ntp/foreign_session_handler.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 1 chunk +6 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Raghu Simha
Nicolas / Tim, could one of you review? Thanks!
8 years, 4 months ago (2012-08-16 04:34:57 UTC) #1
tim (not reviewing)
http://codereview.chromium.org/10834351/diff/1040/chrome/browser/sync/glue/data_type_manager.h File chrome/browser/sync/glue/data_type_manager.h (right): http://codereview.chromium.org/10834351/diff/1040/chrome/browser/sync/glue/data_type_manager.h#newcode53 chrome/browser/sync/glue/data_type_manager.h:53: typedef browser_sync::DataTypeManagerObserver Observer; I'm tempted to suggest defining the ...
8 years, 4 months ago (2012-08-16 18:25:20 UTC) #2
Raghu Simha
Tim, PTAL. +dubroy for the change to chrome/browser/ui/webui/ntp/foreign_session_handler.cc. http://codereview.chromium.org/10834351/diff/1040/chrome/browser/sync/glue/data_type_manager.h File chrome/browser/sync/glue/data_type_manager.h (right): http://codereview.chromium.org/10834351/diff/1040/chrome/browser/sync/glue/data_type_manager.h#newcode53 chrome/browser/sync/glue/data_type_manager.h:53: typedef ...
8 years, 4 months ago (2012-08-17 01:56:42 UTC) #3
tim (not reviewing)
http://codereview.chromium.org/10834351/diff/8026/chrome/browser/sync/glue/data_type_manager_impl.h File chrome/browser/sync/glue/data_type_manager_impl.h (right): http://codereview.chromium.org/10834351/diff/8026/chrome/browser/sync/glue/data_type_manager_impl.h#newcode116 chrome/browser/sync/glue/data_type_manager_impl.h:116: DataTypeManagerObserver* observer_; use const pointer (* const observer_;) http://codereview.chromium.org/10834351/diff/8026/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc ...
8 years, 4 months ago (2012-08-17 19:53:02 UTC) #4
Patrick Dubroy
Changes to ForeignSessionHandler LGTM. On 2012/08/17 01:56:42, rsimha wrote: > Tim, PTAL. > > +dubroy ...
8 years, 4 months ago (2012-08-17 20:29:13 UTC) #5
Raghu Simha
Tim, PTAL. http://codereview.chromium.org/10834351/diff/8026/chrome/browser/sync/glue/data_type_manager_impl.h File chrome/browser/sync/glue/data_type_manager_impl.h (right): http://codereview.chromium.org/10834351/diff/8026/chrome/browser/sync/glue/data_type_manager_impl.h#newcode116 chrome/browser/sync/glue/data_type_manager_impl.h:116: DataTypeManagerObserver* observer_; On 2012/08/17 19:53:02, timsteele wrote: ...
8 years, 4 months ago (2012-08-17 21:06:06 UTC) #6
tim (not reviewing)
LGTM
8 years, 4 months ago (2012-08-17 21:16:21 UTC) #7
Raghu Simha
+OWNERS estade: chrome/browser/ui/webui/ntp/foreign_session_handler.cc thakis: chrome/chrome_browser.gypi and chrome/common/chrome_notification_types.h Thanks!
8 years, 4 months ago (2012-08-17 22:30:54 UTC) #8
Nico
8 years, 4 months ago (2012-08-17 23:31:15 UTC) #9
> thakis: chrome/chrome_browser.gypi and
chrome/common/chrome_notification_types.h

These files lgtm.

Powered by Google App Engine
This is Rietveld 408576698