Chromium Code Reviews

Unified Diff: chrome/browser/push_messaging/push_messaging_notification_manager.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.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/push_messaging/push_messaging_notification_manager.cc
diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager.cc b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
index 88e0aa171051b3941b0d2f57fe62bb168f01e8be..e5ec50aa440c0dd382b4dbdaadd8c18daec556f0 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/notifications/platform_notification_service_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/push_messaging/push_messaging_constants.h"
+#include "chrome/common/features.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/rappor/rappor_utils.h"
@@ -29,7 +30,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/ui/android/tab_model/tab_model.h"
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
#else
@@ -144,7 +145,7 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
bool notification_needed = true;
// Sites with a currently visible tab don't need to show notifications.
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
for (auto it = TabModelList::begin(); it != TabModelList::end(); ++it) {
Profile* profile = (*it)->GetProfile();
WebContents* active_web_contents = (*it)->GetActiveWebContents();
@@ -158,11 +159,7 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
notification_needed = false;
break;
}
-#if defined(OS_ANDROID)
}
-#else
- }
-#endif
// If more than one notification is showing for this Service Worker, close
// the default notification if it happens to be part of this group.
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine