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

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)

Created:
3 years, 11 months ago by Steven Holte
Modified:
3 years, 10 months ago
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, sync-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add shutdown notification and service refs to SyncServiceObserver. Modifies ServiceSyncObserver to recieve SyncService* to the notifying service in all of it's methods. Also adds OnShutdown() notification. This will support adding a long-lived observer in https://codereview.chromium.org/2653693004/ TBR=sdefresne,treib BUG= Review-Url: https://codereview.chromium.org/2657673004 Cr-Commit-Position: refs/heads/master@{#447902} Committed: https://chromium.googlesource.com/chromium/src/+/4ef35706c091a8f8f18fbee2c5672831ad24ecea

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add SyncService* to OnStateChanged #

Total comments: 27

Patch Set 3 : Use parameter #

Total comments: 6

Patch Set 4 : UpdateSyncState #

Patch Set 5 : Rebase #

Patch Set 6 : Minor test fixes #

Patch Set 7 : Updates to ios/ #

Patch Set 8 : One more ios subclass #

Patch Set 9 : Update some extra tests #

Patch Set 10 : More test calls #

Patch Set 11 : Android/Chromeos fixes #

Patch Set 12 : Chromeos fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -173 lines) Patch
M chrome/browser/android/foreign_session_helper.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/android/foreign_session_helper.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/signin/auth_sync_observer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/signin/auth_sync_observer.cc View 1 2 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/extensions/external_pref_loader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/external_pref_loader.cc View 1 2 3 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/history/browsing_history_service.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/browsing_history_service.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_service.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_service.cc View 1 2 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_android.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_error_notifier_ash_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_global_error_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_startup_tracker.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_startup_tracker.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_startup_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/multi_client_status_change_checker.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/multi_client_status_change_checker.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/p2p_invalidation_forwarder.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/p2p_sync_refresher.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/p2p_sync_refresher.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/quiesce_status_change_checker.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/sync_file_system_service.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync_file_system/sync_file_system_service.cc View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/app_sync_ui_state.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/app_sync_ui_state.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/sync/one_click_signin_sync_observer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/sync/one_click_signin_sync_observer.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/foreign_session_handler.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/foreign_session_handler.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.h View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/settings/people_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/settings/people_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/settings/people_handler_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M components/browser_sync/profile_sync_service.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/browser_sync/profile_sync_service.cc View 1 2 3 4 3 chunks +9 lines, -3 lines 0 comments Download
M components/browser_sync/profile_sync_service_startup_unittest.cc View 1 15 chunks +15 lines, -15 lines 0 comments Download
M components/browser_sync/profile_sync_service_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/browsing_data/core/counters/history_counter.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/browsing_data/core/counters/history_counter.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_delete_directives_data_type_controller.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_delete_directives_data_type_controller.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/sessions/tab_delegate_sync_adapter.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M components/ntp_snippets/sessions/tab_delegate_sync_adapter.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc View 1 2 3 4 5 4 chunks +18 lines, -17 lines 0 comments Download
M components/password_manager/sync/browser/password_data_type_controller.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/sync/browser/password_data_type_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/suggestions/suggestions_service_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/suggestions/suggestions_service_impl.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M components/suggestions/suggestions_service_impl_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/sync/driver/sync_error_controller.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/sync/driver/sync_error_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/sync/driver/sync_service_base.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/sync/driver/sync_service_observer.h View 1 2 chunks +10 lines, -4 lines 0 comments Download
M components/sync/driver/sync_service_observer.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/sync/sync_observer_bridge.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/sync/sync_observer_bridge.mm View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions_bridge.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions_bridge.mm View 1 2 3 4 5 6 7 1 chunk +7 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/sync/sync_error_infobar_delegate.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/sync/sync_error_infobar_delegate.mm View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 66 (44 generated)
Steven Holte
3 years, 11 months ago (2017-01-26 00:48:33 UTC) #2
skym
Thanks for making these changes! My main concern is the ShutdownImpl()/NotifyShutdown() ordering. I'm okay if ...
3 years, 11 months ago (2017-01-26 17:00:37 UTC) #3
Steven Holte
https://codereview.chromium.org/2657673004/diff/1/components/browser_sync/profile_sync_service.cc File components/browser_sync/profile_sync_service.cc (right): https://codereview.chromium.org/2657673004/diff/1/components/browser_sync/profile_sync_service.cc#newcode716 components/browser_sync/profile_sync_service.cc:716: NotifyShutdown(); On 2017/01/26 17:00:37, skym wrote: > Having this ...
3 years, 11 months ago (2017-01-26 20:31:47 UTC) #4
skym
Thanks for doing this! lgtm https://codereview.chromium.org/2657673004/diff/20001/chrome/browser/chromeos/login/signin/auth_sync_observer.cc File chrome/browser/chromeos/login/signin/auth_sync_observer.cc (right): https://codereview.chromium.org/2657673004/diff/20001/chrome/browser/chromeos/login/signin/auth_sync_observer.cc#newcode53 chrome/browser/chromeos/login/signin/auth_sync_observer.cc:53: browser_sync::ProfileSyncService* sync_service = This ...
3 years, 10 months ago (2017-01-26 23:43:23 UTC) #5
Steven Holte
https://codereview.chromium.org/2657673004/diff/20001/chrome/browser/chromeos/login/signin/auth_sync_observer.cc File chrome/browser/chromeos/login/signin/auth_sync_observer.cc (right): https://codereview.chromium.org/2657673004/diff/20001/chrome/browser/chromeos/login/signin/auth_sync_observer.cc#newcode53 chrome/browser/chromeos/login/signin/auth_sync_observer.cc:53: browser_sync::ProfileSyncService* sync_service = On 2017/01/26 23:43:22, skym wrote: > ...
3 years, 10 months ago (2017-01-27 02:27:19 UTC) #6
Steven Holte
+sky for chrome/browser +sdefresne for components/ (other than c/sync/ c/browser_sync/)
3 years, 10 months ago (2017-01-27 02:39:44 UTC) #9
sky
https://codereview.chromium.org/2657673004/diff/40001/chrome/browser/extensions/external_pref_loader.cc File chrome/browser/extensions/external_pref_loader.cc (right): https://codereview.chromium.org/2657673004/diff/40001/chrome/browser/extensions/external_pref_loader.cc#newcode158 chrome/browser/extensions/external_pref_loader.cc:158: if (!sync->CanSyncStart()) { remove {} https://codereview.chromium.org/2657673004/diff/40001/chrome/browser/ui/webui/options/clear_browser_data_handler.cc File chrome/browser/ui/webui/options/clear_browser_data_handler.cc (right): ...
3 years, 10 months ago (2017-01-27 16:29:44 UTC) #10
Steven Holte
https://codereview.chromium.org/2657673004/diff/40001/chrome/browser/extensions/external_pref_loader.cc File chrome/browser/extensions/external_pref_loader.cc (right): https://codereview.chromium.org/2657673004/diff/40001/chrome/browser/extensions/external_pref_loader.cc#newcode158 chrome/browser/extensions/external_pref_loader.cc:158: if (!sync->CanSyncStart()) { On 2017/01/27 16:29:44, sky wrote: > ...
3 years, 10 months ago (2017-01-27 20:11:45 UTC) #11
sky
LGTM
3 years, 10 months ago (2017-01-27 23:38:03 UTC) #12
Steven Holte
+stevenjb for chrome/browser/ui/webui/options
3 years, 10 months ago (2017-01-28 00:07:34 UTC) #14
stevenjb
ui/webui/options|settings lgtm
3 years, 10 months ago (2017-01-28 01:01:00 UTC) #15
Steven Holte
+treib for components/suggestions and components/ntp_snippets +mkwst for components/browsing_data and components/password_manager
3 years, 10 months ago (2017-01-30 19:14:06 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/2657673004/60001
3 years, 10 months ago (2017-02-01 20:08:35 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/147382) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-01 20:11:52 UTC) #23
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/2657673004/80001
3 years, 10 months ago (2017-02-01 21:10:50 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/147425) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-01 21:19:52 UTC) #28
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/2657673004/100001
3 years, 10 months ago (2017-02-01 22:01:06 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/145943) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-01 22:09:32 UTC) #33
Mike West
On 2017/01/30 at 19:14:06, holte wrote: > +mkwst for components/browsing_data and components/password_manager LGTM.
3 years, 10 months ago (2017-02-02 20:50:24 UTC) #46
Steven Holte
TBR +sdefresne for ios/chrome/
3 years, 10 months ago (2017-02-03 02:50:08 UTC) #60
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/2657673004/220001
3 years, 10 months ago (2017-02-03 02:50:49 UTC) #63
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 03:30:49 UTC) #66
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/4ef35706c091a8f8f18fbee2c567...

Powered by Google App Engine
This is Rietveld 408576698