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

Issue 1310373009: [Sync] Remove static methods on SyncedWindowDelegate. (Closed)

Created:
5 years, 3 months ago by maxbogue
Modified:
5 years, 3 months ago
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, zea+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] Remove static methods on SyncedWindowDelegate. Before, two static methods (GetAll and FindByID) were declared on SyncedWindowDelegate but defined in platform specific files. Now, those methods exist on SyncedWindowDelegatesGetter so they can use polymorphism for platform specificity. SyncedTabDelegate was the biggest challenge since it is not really accessible when constructed to pass the getter in. Instead, the SyncedWindowDelegatesGetter is set in SyncedTabDelegate::ImplFromWebContents, before anything else uses the object as a SyncedTabDelegate. This CL is a prerequisite to componentizing SyncedWindowDelegate and SyncedWindowDelegatesGetter. BUG=512472 Committed: https://crrev.com/a3b1e30c365c1a8c9ca659943349aedd603ef5f4 Cr-Commit-Position: refs/heads/master@{#347840}

Patch Set 1 #

Patch Set 2 : Fix Mac compile. #

Patch Set 3 : Null check and fix tests. #

Patch Set 4 : Fix Android compile. #

Total comments: 26

Patch Set 5 : Address commnets. #

Patch Set 6 : Fix Android build. #

Total comments: 8

Patch Set 7 : Address comments. #

Patch Set 8 : Fix SyncedTabDelegateAndroid. #

Patch Set 9 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -130 lines) Patch
M chrome/browser/sync/glue/synced_tab_delegate.h View 1 2 3 4 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/synced_tab_delegate.cc View 1 2 3 4 5 6 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/synced_tab_delegate_android.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/synced_tab_delegate_android.cc View 1 2 3 4 5 6 7 5 chunks +27 lines, -28 lines 0 comments Download
M chrome/browser/sync/glue/synced_tab_delegate_desktop.cc View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/synced_window_delegate.h View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/synced_window_delegate_android.cc View 1 chunk +0 lines, -19 lines 0 comments Download
A chrome/browser/sync/glue/synced_window_delegates_getter_android.h View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/synced_window_delegates_getter_android.cc View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/session_data_type_controller_unittest.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc View 1 2 3 4 5 6 7 chunks +19 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/synced_window_delegates_getter.h View 1 2 3 4 1 chunk +11 lines, -1 line 0 comments Download
M chrome/browser/sync/sessions/synced_window_delegates_getter.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm View 1 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/sync/browser_synced_window_delegate.h View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/sync/browser_synced_window_delegate.cc View 2 chunks +0 lines, -36 lines 0 comments Download
A chrome/browser/ui/sync/browser_synced_window_delegates_getter.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/sync/browser_synced_window_delegates_getter.cc View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (11 generated)
maxbogue
Hey Nicolas, could you review this change?
5 years, 3 months ago (2015-08-31 19:40:09 UTC) #2
Nicolas Zea
Nice job! Mostly nits https://codereview.chromium.org/1310373009/diff/60001/chrome/browser/sync/glue/synced_tab_delegate.h File chrome/browser/sync/glue/synced_tab_delegate.h (right): https://codereview.chromium.org/1310373009/diff/60001/chrome/browser/sync/glue/synced_tab_delegate.h#newcode29 chrome/browser/sync/glue/synced_tab_delegate.h:29: SyncedTabDelegate(); nit: I think it ...
5 years, 3 months ago (2015-08-31 22:12:48 UTC) #3
maxbogue
https://codereview.chromium.org/1310373009/diff/60001/chrome/browser/sync/glue/synced_tab_delegate.h File chrome/browser/sync/glue/synced_tab_delegate.h (right): https://codereview.chromium.org/1310373009/diff/60001/chrome/browser/sync/glue/synced_tab_delegate.h#newcode29 chrome/browser/sync/glue/synced_tab_delegate.h:29: SyncedTabDelegate(); On 2015/08/31 22:12:47, Nicolas Zea wrote: > nit: ...
5 years, 3 months ago (2015-09-01 17:29:28 UTC) #4
Nicolas Zea
LGTM with a couple nits! Great to see this getting cleaned up! https://codereview.chromium.org/1310373009/diff/100001/chrome/browser/sync/glue/synced_tab_delegate.cc File chrome/browser/sync/glue/synced_tab_delegate.cc ...
5 years, 3 months ago (2015-09-02 21:19:44 UTC) #5
maxbogue
https://codereview.chromium.org/1310373009/diff/100001/chrome/browser/sync/glue/synced_tab_delegate.cc File chrome/browser/sync/glue/synced_tab_delegate.cc (right): https://codereview.chromium.org/1310373009/diff/100001/chrome/browser/sync/glue/synced_tab_delegate.cc#newcode71 chrome/browser/sync/glue/synced_tab_delegate.cc:71: NOTREACHED(); On 2015/09/02 21:19:43, Nicolas Zea wrote: > Generally ...
5 years, 3 months ago (2015-09-02 23:05:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1310373009/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1310373009/120001
5 years, 3 months ago (2015-09-03 00:31:29 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/95958)
5 years, 3 months ago (2015-09-03 00:50:00 UTC) #11
maxbogue
+pkasting for: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
5 years, 3 months ago (2015-09-03 01:11:22 UTC) #13
Peter Kasting
LGTM. That's sure an awkward classname.
5 years, 3 months ago (2015-09-03 05:03:59 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1310373009/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1310373009/120001
5 years, 3 months ago (2015-09-03 16:50:32 UTC) #16
maxbogue
On 2015/09/03 05:03:59, Peter Kasting wrote: > LGTM. That's sure an awkward classname. Sure is! ...
5 years, 3 months ago (2015-09-03 17:08:31 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/64709)
5 years, 3 months ago (2015-09-03 19:58:56 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1310373009/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1310373009/120001
5 years, 3 months ago (2015-09-03 20:03:20 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/64856)
5 years, 3 months ago (2015-09-03 23:52:44 UTC) #23
maxbogue
Nicolas, please take a look at the new changes to synced_tab_delegate_android.cc. It wraps a TabContentsSyncedTabDelegate, ...
5 years, 3 months ago (2015-09-08 21:21:52 UTC) #24
Nicolas Zea
LGTM
5 years, 3 months ago (2015-09-08 23:55:31 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1310373009/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1310373009/160001
5 years, 3 months ago (2015-09-08 23:59:59 UTC) #28
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 3 months ago (2015-09-09 00:07:33 UTC) #29
commit-bot: I haz the power
5 years, 3 months ago (2015-09-09 00:08:25 UTC) #30
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/a3b1e30c365c1a8c9ca659943349aedd603ef5f4
Cr-Commit-Position: refs/heads/master@{#347840}

Powered by Google App Engine
This is Rietveld 408576698