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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2504433002: [Sync] Return nullptr for OpenTabsUIDelegate when PROXY_TABS is disabled. (Closed)
Patch Set: Gave test case an appropriate name. Created 4 years, 1 month 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.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index ad29ab5986023d10f4049b4f74b2b92a14e14930..463de4b74b927c064764d0f0f59d057380fd6139 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -424,9 +424,11 @@ bool ProfileSyncService::IsDataTypeControllerRunning(
}
sync_sessions::OpenTabsUIDelegate* ProfileSyncService::GetOpenTabsUIDelegate() {
- if (!IsDataTypeControllerRunning(syncer::SESSIONS))
- return nullptr;
- return sessions_sync_manager_.get();
+ // Although the backing data actually is of type |SESSIONS|, the desire to use
+ // open tabs functionality is tracked by the state of the |PROXY_TABS| type.
+ return IsDataTypeControllerRunning(syncer::PROXY_TABS)
+ ? sessions_sync_manager_.get()
+ : nullptr;
}
sync_sessions::FaviconCache* ProfileSyncService::GetFaviconCache() {
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_apitest.cc ('k') | components/browser_sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698