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

Unified Diff: components/browser_sync/profile_sync_service_mock.cc

Issue 2768633003: Dynamic updating recent menu for tabs from other devices. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/browser_sync/profile_sync_service_mock.cc
diff --git a/components/browser_sync/profile_sync_service_mock.cc b/components/browser_sync/profile_sync_service_mock.cc
index d2dd85c1d218629736bb716d5f2f347b84569a24..8654942d327c88509ad3a41c6a8b6cdbc525b8ac 100644
--- a/components/browser_sync/profile_sync_service_mock.cc
+++ b/components/browser_sync/profile_sync_service_mock.cc
@@ -18,4 +18,13 @@ ProfileSyncServiceMock::ProfileSyncServiceMock(InitParams* init_params)
ProfileSyncServiceMock::~ProfileSyncServiceMock() {}
+sync_sessions::OpenTabsUIDelegate*
+ProfileSyncServiceMock::GetOpenTabsUIDelegate() {
+ // If delegate is not mocked then we use usual one
Peter Kasting 2017/03/23 04:48:35 Nit: Remove this comment, it adds nothing to the c
+ sync_sessions::OpenTabsUIDelegate* tabs = GetOpenTabsUIDelegateMock();
Peter Kasting 2017/03/23 04:48:35 Nit: Call this |mock| or |delegate| or |mock_deleg
+ if (!tabs)
+ return ProfileSyncService::GetOpenTabsUIDelegate();
+ return tabs;
Peter Kasting 2017/03/23 04:48:35 Nit: Simpler: return tabs ? tabs : ProfileSyncS
+}
+
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698