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

Unified Diff: chrome/browser/sync/sessions/notification_service_sessions_router.cc

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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
« no previous file with comments | « chrome/browser/sync/chrome_sync_client.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sessions/notification_service_sessions_router.cc
diff --git a/chrome/browser/sync/sessions/notification_service_sessions_router.cc b/chrome/browser/sync/sessions/notification_service_sessions_router.cc
index f66ec51a799040c573292d45b9e8c6383b26a95e..780ff29f0530d03590ae1b231beddd6c9c5a87a9 100644
--- a/chrome/browser/sync/sessions/notification_service_sessions_router.cc
+++ b/chrome/browser/sync/sessions/notification_service_sessions_router.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h"
#include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
+#include "chrome/common/features.h"
#include "components/history/core/browser/history_service.h"
#include "components/sync_sessions/sync_sessions_client.h"
#include "components/sync_sessions/synced_tab_delegate.h"
@@ -22,7 +23,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/android/tab_android.h"
#endif
@@ -44,14 +45,14 @@ namespace {
SyncedTabDelegate* GetSyncedTabDelegateFromWebContents(
content::WebContents* web_contents) {
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
TabAndroid* tab = TabAndroid::FromWebContents(web_contents);
return tab ? tab->GetSyncedTabDelegate() : nullptr;
-#else // !OS_ANDROID
+#else
SyncedTabDelegate* delegate =
TabContentsSyncedTabDelegate::FromWebContents(web_contents);
return delegate;
-#endif // OS_ANDROID
+#endif
}
} // namespace
« no previous file with comments | « chrome/browser/sync/chrome_sync_client.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698